Sin descripción

login.html 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n static %}
  3. {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/login.css" %}">
  4. {{ form.media }}
  5. {% endblock %}
  6. {% block bodyclass %}{{ block.super }} login{% endblock %}
  7. {% block usertools %}{% endblock %}
  8. {% block nav-global %}{% endblock %}
  9. {% block nav-sidebar %}{% endblock %}
  10. {% block content_title %}{% endblock %}
  11. {% block breadcrumbs %}{% endblock %}
  12. {% block content %}
  13. {% if form.errors and not form.non_field_errors %}
  14. <p class="errornote">
  15. {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %}
  16. </p>
  17. {% endif %}
  18. {% if form.non_field_errors %}
  19. {% for error in form.non_field_errors %}
  20. <p class="errornote">
  21. {{ error }}
  22. </p>
  23. {% endfor %}
  24. {% endif %}
  25. <div id="content-main">
  26. {% if user.is_authenticated %}
  27. <p class="errornote">
  28. {% blocktranslate trimmed %}
  29. You are authenticated as {{ username }}, but are not authorized to
  30. access this page. Would you like to login to a different account?
  31. {% endblocktranslate %}
  32. </p>
  33. {% endif %}
  34. <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
  35. <div class="form-row">
  36. {{ form.username.errors }}
  37. {{ form.username.label_tag }} {{ form.username }}
  38. </div>
  39. <div class="form-row">
  40. {{ form.password.errors }}
  41. {{ form.password.label_tag }} {{ form.password }}
  42. <input type="hidden" name="next" value="{{ next }}">
  43. </div>
  44. {% url 'admin_password_reset' as password_reset_url %}
  45. {% if password_reset_url %}
  46. <div class="password-reset-link">
  47. <a href="{{ password_reset_url }}">{% translate 'Forgotten your password or username?' %}</a>
  48. </div>
  49. {% endif %}
  50. <div class="submit-row">
  51. <input type="submit" value="{% translate 'Log in' %}">
  52. </div>
  53. </form>
  54. </div>
  55. {% endblock %}