Fill in form action attribute in user_detail.html.

Using Chrome, the update form didn't submit with a blank action, but worked fine once I specified it.

Also, in researching whether a blank action attribute was OK, I found out that according to the HTML5 spec, the action attribute "must have a value that is a valid non-empty URL potentially surrounded by spaces."

http://www.w3.org/TR/html5/forms.html#attr-fs-action
This commit is contained in:
Tom Offermann 2013-10-01 23:40:58 -07:00
parent 3680c7b60e
commit f8b4e6f0a1

View File

@ -9,7 +9,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h1>{% block header %}User: {{ user.username }}{% endblock %}</h1> <h1>{% block header %}User: {{ user.username }}{% endblock %}</h1>
<form class="form-horizontal" method="post" action=""> <form class="form-horizontal" method="post" action="{% url 'users:update' %}">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<div class="control-group"> <div class="control-group">
@ -21,4 +21,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %}{% endraw %} {% endblock %}{% endraw %}