diff --git a/project/settings.py b/project/settings.py index 99c6b62..191814f 100644 --- a/project/settings.py +++ b/project/settings.py @@ -110,3 +110,5 @@ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' + +INTERNAL_IPS = ['127.0.0.1'] diff --git a/project/urls.py b/project/urls.py index 7165878..5c6a8e3 100644 --- a/project/urls.py +++ b/project/urls.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.conf.urls import include, url from django.contrib import admin @@ -12,3 +13,9 @@ urlpatterns = [ url(r'^health$', health), url(r'^admin/', include(admin.site.urls)), ] + +if settings.DEBUG: + import debug_toolbar + urlpatterns = [ + url(r'^__debug__/', include(debug_toolbar.urls)), + ] + urlpatterns diff --git a/requirements.txt b/requirements.txt index 08db289..0c0e4eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ django>=1.8,<1.9 -django-debug-toolbar==1.5 +django-debug-toolbar==1.8 gunicorn==19.4.5 psycopg2==2.7.3.1 whitenoise==3.0