Update example site...

... to reflect last changes.

django-debug-toolbar is now installed.
This commit is contained in:
Aurélien Delobelle 2017-09-16 02:41:30 +02:00
parent 7932da906e
commit a4af0c89f5
4 changed files with 16 additions and 2 deletions

View file

@ -50,7 +50,6 @@ Non connecté
<p>Les pages suivantes nécessitent d'être connecté pour y accéder.</p> <p>Les pages suivantes nécessitent d'être connecté pour y accéder.</p>
<ul> <ul>
<li><a href="{% url "account_settings" %}">Paramètres</a></li>
<li><a href="{% url "account_change_password" %}">Modifier le mot de passe</a></li> <li><a href="{% url "account_change_password" %}">Modifier le mot de passe</a></li>
<li><a href="{% url "account_email" %}">Emails</a></li> <li><a href="{% url "account_email" %}">Emails</a></li>
<li><a href="{% url "socialaccount_connections" %}">Connexions par tiers</a></li> <li><a href="{% url "socialaccount_connections" %}">Connexions par tiers</a></li>
@ -86,3 +85,6 @@ Non connecté
<li><a href="{% url "account_logout" %}?next=/user/">Redirection: /user/</a></li> <li><a href="{% url "account_logout" %}?next=/user/">Redirection: /user/</a></li>
<li><a href="{% url "account_logout" %}?next=/root/">Redirection: /root/</a></li> <li><a href="{% url "account_logout" %}?next=/root/">Redirection: /root/</a></li>
</ul> </ul>
</body>
</html>

View file

@ -1 +1,2 @@
-e ../ -e ../
django-debug-toolbar

View file

@ -22,6 +22,7 @@ INSTALLED_APPS = [
'django.contrib.sites', 'django.contrib.sites',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'debug_toolbar',
'widget_tweaks', 'widget_tweaks',
# This one must be before 'allauth' to replace its templates. # This one must be before 'allauth' to replace its templates.
@ -43,6 +44,7 @@ INSTALLED_APPS = [
_MIDDLEWARES = [ _MIDDLEWARES = [
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
@ -109,10 +111,15 @@ USE_TZ = True
STATIC_URL = '/static/' STATIC_URL = '/static/'
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': lambda r: True,
}
AUTH_USER_MODEL = 'app.User' AUTH_USER_MODEL = 'app.User'
LOGIN_URL = '/account/login/' LOGIN_URL = '/account/login/'
LOGIN_REDIRECT_URL = '/account/settings/' LOGIN_REDIRECT_URL = 'user-view'
ACCOUNT_LOGOUT_REDIRECT_URL = 'view'
SOCIALACCOUNT_QUERY_EMAIL = True SOCIALACCOUNT_QUERY_EMAIL = True

View file

@ -3,6 +3,8 @@ from django.contrib import admin
from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.decorators import login_required, permission_required
from django.views.generic import RedirectView from django.views.generic import RedirectView
import debug_toolbar
from app import views from app import views
urlpatterns = [ urlpatterns = [
@ -28,3 +30,5 @@ urlpatterns = [
# (Redirect from /) # (Redirect from /)
url(r'^$', RedirectView.as_view(url='/view/')), url(r'^$', RedirectView.as_view(url='/view/')),
] ]
urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls))]