Setup basic auth
This commit is contained in:
parent
3294ef2a82
commit
d7545ab43c
17 changed files with 315 additions and 4 deletions
27
base/templates/base/form.html
Normal file
27
base/templates/base/form.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% if form.non_field_errors %}
|
||||
<ul class="form-errors">
|
||||
{% for error in form.non_field_errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% url "login" %}">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
{% for field in form %}
|
||||
<label>
|
||||
{{ field.label }}
|
||||
{{ field }}
|
||||
</label>
|
||||
{% if field.errors %}
|
||||
<ul class="form-errors">
|
||||
{% for error in field.errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
<input type="submit" {% if submit %}value="{{ submit }}"{% endif %}>
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue