fix for clean logout
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
{% extends "base.html" %}
|
|
||||||
{% load url from future %}
|
|
||||||
{% comment %}
|
|
||||||
Main page to authenticate users.
|
|
||||||
{% endcomment %}
|
|
||||||
|
|
||||||
{% block head %}
|
|
||||||
<title>TipPy | Login</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block nav %}
|
|
||||||
{% include "nav_login.html" with ls=ls season=season %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
{% if form.errors %}
|
|
||||||
<div class="row">
|
|
||||||
<p>Benutzename und Passwort passen nicht zusammen. Bitte versuche es noch einmal.</p>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<form class="form-signin" role="form" method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
|
||||||
<h2 class="form-signin-heading">Bitte melde dich an</h2>
|
|
||||||
{% csrf_token %}
|
|
||||||
<input class="form-control" type="text" autofocus="" required="" name="{{form.username.html_name}}" placeholder="Anmeldename" />
|
|
||||||
<input class="form-control" type="password" required="" placeholder="Passwort" name="{{form.password.html_name}}" />
|
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Anmelden</button>
|
|
||||||
<input type="hidden" name="next" value="{{ next }}" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="/accounts/profile/{{user.id}}">Profil ändern</a></li>
|
<li><a href="/accounts/profile/{{user.id}}">Profil ändern</a></li>
|
||||||
<li><a href="/accounts/password_change/">Passwort ändern</a></li>
|
<li><a href="/accounts/password_change/">Passwort ändern</a></li>
|
||||||
<li><a href="/logout">Abmelden</a></li>
|
<li><a href="/accounts/logout">Abmelden</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
15
templates/registration/logout.html
Normal file
15
templates/registration/logout.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load url from future %}
|
||||||
|
{% comment %}
|
||||||
|
Main page to authenticate users.
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
<title>TipPy | Logout</title>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="row">
|
||||||
|
<p>Auf wiedersehen</p>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -23,7 +23,7 @@ urlpatterns = [
|
|||||||
re_path(r'^blog/(?P<page>\d)$', views.blogindex),
|
re_path(r'^blog/(?P<page>\d)$', views.blogindex),
|
||||||
re_path(r'^about$', views.about),
|
re_path(r'^about$', views.about),
|
||||||
re_path(r'^accounts/login/', auth_views.LoginView.as_view()),
|
re_path(r'^accounts/login/', auth_views.LoginView.as_view()),
|
||||||
re_path(r'^logout', auth_views.LogoutView.as_view())
|
re_path(r'^accounts/logout/', auth_views.LogoutView.as_view())
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG is True:
|
if settings.DEBUG is True:
|
||||||
|
|||||||
Reference in New Issue
Block a user