diff --git a/example/app/templates/app/home.html b/example/app/templates/app/home.html index 910e176..bbea9b6 100644 --- a/example/app/templates/app/home.html +++ b/example/app/templates/app/home.html @@ -50,7 +50,6 @@ Non connecté

Les pages suivantes nécessitent d'être connecté pour y accéder.

+ + + diff --git a/example/requirements.txt b/example/requirements.txt index c642fd0..ae78796 100644 --- a/example/requirements.txt +++ b/example/requirements.txt @@ -1 +1,2 @@ -e ../ +django-debug-toolbar diff --git a/example/settings.py b/example/settings.py index 5c04e80..dd0c34d 100644 --- a/example/settings.py +++ b/example/settings.py @@ -22,6 +22,7 @@ INSTALLED_APPS = [ 'django.contrib.sites', 'django.contrib.staticfiles', + 'debug_toolbar', 'widget_tweaks', # This one must be before 'allauth' to replace its templates. @@ -43,6 +44,7 @@ INSTALLED_APPS = [ _MIDDLEWARES = [ 'django.middleware.common.CommonMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', @@ -109,10 +111,15 @@ USE_TZ = True STATIC_URL = '/static/' +DEBUG_TOOLBAR_CONFIG = { + 'SHOW_TOOLBAR_CALLBACK': lambda r: True, +} + AUTH_USER_MODEL = 'app.User' LOGIN_URL = '/account/login/' -LOGIN_REDIRECT_URL = '/account/settings/' +LOGIN_REDIRECT_URL = 'user-view' +ACCOUNT_LOGOUT_REDIRECT_URL = 'view' SOCIALACCOUNT_QUERY_EMAIL = True diff --git a/example/urls.py b/example/urls.py index 98df25d..59d2f12 100644 --- a/example/urls.py +++ b/example/urls.py @@ -3,6 +3,8 @@ from django.contrib import admin from django.contrib.auth.decorators import login_required, permission_required from django.views.generic import RedirectView +import debug_toolbar + from app import views urlpatterns = [ @@ -28,3 +30,5 @@ urlpatterns = [ # (Redirect from /) url(r'^$', RedirectView.as_view(url='/view/')), ] + +urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls))]