kopia lustrzana https://gitlab.com/marnanel/chapeau
login takes you to the root page
rodzic
1d9c630f11
commit
12d2452aaf
|
@ -1,6 +1,12 @@
|
|||
{% extends '../base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% if form.errors %}
|
||||
<p>Your username and password didn't match. Please try again.</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
|
@ -17,6 +23,8 @@
|
|||
{{ form.password }}
|
||||
{{ form.password.errors }}
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -12,6 +12,10 @@ import kepi.tophat_ui.forms as tophat_forms
|
|||
urlpatterns = [
|
||||
path('', tophat_views.RootPage.as_view()),
|
||||
|
||||
path('login/', django.contrib.auth.views.LoginView.as_view()),
|
||||
path('login/', django.contrib.auth.views.LoginView.as_view(
|
||||
extra_context = {
|
||||
'next': '/',
|
||||
},
|
||||
)),
|
||||
|
||||
]
|
||||
|
|
Ładowanie…
Reference in New Issue