login.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends "base.html" %}
  2. {% block header_title %}Login{% endblock %}
  3. {% block section_title %}Login{% endblock %}
  4. {% block debug %}
  5. {% endblock %}
  6. {% block content %}
  7. {% if form.errors %}
  8. <p>Your username and password didn't match. Please try again.</p>
  9. {% endif %}
  10. {% if next %}
  11. {% if user.is_authenticated %}
  12. <p>Your account doesn't have access to this page. To proceed,
  13. please login with an account that has access.</p>
  14. {% else %}
  15. <p>Please login to see this page.</p>
  16. {% endif %}
  17. {% endif %}
  18. <form method="post" action="{% url 'registration-login' %}">
  19. {% csrf_token %}
  20. <table>
  21. <tr>
  22. <td>{{ form.username.label_tag }}</td>
  23. <td>{{ form.username }}</td>
  24. </tr>
  25. <tr>
  26. <td>{{ form.password.label_tag }}</td>
  27. <td>{{ form.password }}</td>
  28. </tr>
  29. </table>
  30. <input type="submit" value="login">
  31. <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'interface:interface-list' %}{% endif %}">
  32. </form>
  33. {# Assumes you setup the password_reset view in your URLconf #}
  34. <p><a href=" url 'vauth-reset' ">Lost password?</a></p>
  35. {% endblock %}