Skip to content

Commit

Permalink
Fixing the comment for POST action, but still don't know why it works…
Browse files Browse the repository at this point in the history
…, because what I introduced is an empty action on the form, @cdvv7788 do you have some ideas about the why?
  • Loading branch information
sebastian-code committed Mar 21, 2016
1 parent f97a203 commit b40fdae
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions qa/templates/qa/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

{% block content %}

{% if message %}
<strong>Enter a valid comment!</strong>
{% endif %}
{% if message %}
<strong>Enter a valid comment!</strong>
{% endif %}

<form id="add_q" method="post" action="{% url 'qa-comment' answer_id %}">
{% csrf_token %}
<input class="input-lg" style="width:100%" placeholder="Enter your comment....." type="text" name="comment"/> <br/><br/>
<input type="hidden" value="{{ user.id }}" name="user" />
<input class="btn pull-right btn-success" type="submit" value="Submit Comment" />
</form>
<p>Note. Comment cannot be empty!</p>

</div>
{# <form id="add_q" method="post" action="{% url 'qa_comment' answer.id %}"> #}
<form id="add_q" method="post" action="#">
{% csrf_token %}
<input class="input-lg" style="width:100%" placeholder="Enter your comment....." type="text" name="comment"/> <br/><br/>
<input type="hidden" value="{{ user.id }}" name="user" />
<input class="btn pull-right btn-success" type="submit" value="Submit Comment" />
</form>
<p>Note. Comment cannot be empty!</p>

{% endblock content %}

0 comments on commit b40fdae

Please sign in to comment.