login.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 branding %}<h1>ArchiveBox Admin</h1>{% endblock %}
  8. {% block usertools %}
  9. <br/>
  10. <a href="{% url 'Home' %}">Back to Main Index</a>
  11. {% endblock %}
  12. {% block nav-global %}{% endblock %}
  13. {% block content_title %}
  14. <center>
  15. Log in to add, edit, and remove links from your archive.
  16. </center><br/><br/>
  17. <img src="{% static 'archive.png' %}" style="width: 80px; display: block; margin: auto"/><br/>
  18. {% endblock %}
  19. {% block breadcrumbs %}{% endblock %}
  20. {% block content %}
  21. {% if form.errors and not form.non_field_errors %}
  22. <p class="errornote">
  23. {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
  24. </p>
  25. {% endif %}
  26. {% if form.non_field_errors %}
  27. {% for error in form.non_field_errors %}
  28. <p class="errornote">
  29. {{ error }}
  30. </p>
  31. {% endfor %}
  32. {% endif %}
  33. <div id="content-main">
  34. {% if user.is_authenticated %}
  35. <p class="errornote">
  36. {% blocktrans trimmed %}
  37. You are authenticated as {{ username }}, but are not authorized to
  38. access this page. Would you like to login to a different account?
  39. {% endblocktrans %}
  40. </p>
  41. {% endif %}
  42. <br/>
  43. <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
  44. <div class="form-row">
  45. {{ form.username.errors }}
  46. {{ form.username.label_tag }} {{ form.username }}
  47. </div>
  48. <div class="form-row">
  49. {{ form.password.errors }}
  50. {{ form.password.label_tag }} {{ form.password }}
  51. <input type="hidden" name="next" value="{{ next }}">
  52. </div>
  53. {% url 'admin_password_reset' as password_reset_url %}
  54. {% if password_reset_url %}
  55. <div class="password-reset-link">
  56. <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a>
  57. </div>
  58. {% endif %}
  59. <div class="submit-row">
  60. <label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}">
  61. </div>
  62. </form>
  63. <center>
  64. <br/><br/>
  65. <hr/>
  66. <br/>
  67. If you forgot your password, <a href="/accounts/password_reset/">reset it here</a> or run:<br/>
  68. <pre>
  69. archivebox manage changepassword USERNAME
  70. </pre>
  71. <br/><br/>
  72. <hr/>
  73. <br/>
  74. To create a new admin user, run the following:
  75. <pre>
  76. archivebox manage createsuperuser
  77. </pre>
  78. <br/>
  79. <hr/>
  80. <small><i>(cd into your archive folder before running commands)</i></small>
  81. </center>
  82. </div>
  83. {% endblock %}