login.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends "account/base.html" %}
  2. {% load i18n %}
  3. {% load account socialaccount %}
  4. {% block head_title %}{% trans "Sign In" %}{% endblock %}
  5. {% block content %}
  6. <h1>{% trans "Sign In" %}</h1>
  7. {% get_providers as socialaccount_providers %}
  8. {% if socialaccount_providers %}
  9. <p>{% blocktrans with site.name as site_name %}Please sign in with one
  10. of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
  11. for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
  12. <div class="socialaccount_ballot">
  13. <ul class="socialaccount_providers">
  14. {% include "socialaccount/snippets/provider_list.html" with process="login" %}
  15. </ul>
  16. <div class="login-or">{% trans 'or' %}</div>
  17. </div>
  18. {% include "socialaccount/snippets/login_extra.html" %}
  19. {% else %}
  20. <p>{% blocktrans %}If you have not hhhhhhhhhhhhhhhhhhhhhcreated an account yet, then please
  21. <a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
  22. {% endif %}
  23. <form class="login" method="POST" action="{% url 'account_login' %}">
  24. {% csrf_token %}
  25. {{ form.as_p }}
  26. {% if redirect_field_value %}
  27. <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
  28. {% endif %}
  29. <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
  30. <button class="primaryAction" type="submit">{% trans "Sign In" %}</button>
  31. </form>
  32. {% endblock %}