forked from DGNum/gestioCOF
Mise à jour de django_debug_toolbar
This commit is contained in:
parent
a55d34380c
commit
0cca9f0861
2 changed files with 15 additions and 4 deletions
|
@ -53,6 +53,7 @@ INSTALLED_APPS = (
|
|||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
|
|
18
cof/urls.py
18
cof/urls.py
|
@ -1,24 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Fichier principal de configuration des urls du projet GestioCOF
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import autocomplete_light
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
import autocomplete_light
|
||||
|
||||
from django.contrib.auth import views as django_views
|
||||
from django_cas_ng import views as django_cas_views
|
||||
|
||||
from gestioncof import views as gestioncof_views, csv_views
|
||||
from gestioncof.urls import export_patterns, petitcours_patterns, \
|
||||
surveys_patterns, events_patterns, calendar_patterns, \
|
||||
clubs_patterns
|
||||
|
||||
from gestioncof.autocomplete import autocomplete
|
||||
|
||||
autocomplete_light.autodiscover()
|
||||
|
@ -89,6 +92,13 @@ my_urlpatterns = [
|
|||
# Si on est en production, MEDIA_ROOT est servi par Apache.
|
||||
# Il faut dire à Django de servir MEDIA_ROOT lui-même en développement.
|
||||
|
||||
if settings.DEBUG:
|
||||
import debug_toolbar
|
||||
my_urlpatterns += [
|
||||
url(r'^__debug__/',
|
||||
include(debug_toolbar.urls)),
|
||||
]
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^gestion/', include(my_urlpatterns))
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue