add django-user-accounts

This commit is contained in:
Seth Ladygo
2019-03-13 19:12:06 -07:00
parent 6e21f5b91a
commit 0db088d8f9
28 changed files with 371 additions and 1 deletions

View File

@ -0,0 +1,42 @@
{% extends "base.html" %}
{% load account_tags %}
{% load i18n %}
{% block title %}{% trans "Log in" %}{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-4">
<form method="POST" action="{% url "account_login" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
<legend>{% trans "Log in to an existing account" %}</legend>
{% csrf_token %}
{{ form }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<button type="submit" class="btn btn-primary">{% trans "Log in" %}</button>
<a href="{% url "account_password_reset" %}" class="btn btn-link">{% trans "Forgot your password?" %}</a>
</form>
{% if ACCOUNT_OPEN_SIGNUP %}
<p class="login-signup">
<small>
{% trans "Don't have an account?" %} <strong><a href="{% urlnext 'account_signup' %}">{% trans "Sign up" %}</a></strong>
</small>
</p>
{% endif %}
</div>
<div class="col-md-4">
{% include "account/_login_sidebar.html" %}
</div>
</div>
{% endblock %}
{% block scripts %}
{{ block.super }}
<script type="text/javascript">
$(document).ready(function() {
$('#id_username').focus();
});
</script>
{% endblock %}