Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Added debug_toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
George Schneeloch committed Sep 30, 2015
1 parent 27e5010 commit 728cf6b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Expand Up @@ -19,6 +19,7 @@ web:
build: .
command: >
/bin/bash -c '
export HOST_IP=$(netstat -nr | grep ^0\.0\.0\.0 | awk "{print \$2}") &&
sleep 3 &&
npm install --production --no-bin-links &&
python manage.py migrate &&
Expand Down
21 changes: 21 additions & 0 deletions lore/settings.py
Expand Up @@ -81,6 +81,8 @@ def get_var(name, default):
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'debug_toolbar',
'elastic_panel',
'storages',
'compressor',
'bootstrap3',
Expand Down Expand Up @@ -343,6 +345,22 @@ def get_var(name, default):
},
}

DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'elastic_panel.panel.ElasticDebugPanel'
]

REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
Expand Down Expand Up @@ -391,5 +409,8 @@ def get_var(name, default):
STATSD_PREFIX = get_var('LORE_STATSD_PREFIX', None)
STATSD_MAXUDPSIZE = get_var('LORE_STATSD_MAXUDPSIZE', 512)

# Required for Django Debug Toolbar
INTERNAL_IPS = (get_var('HOST_IP', '127.0.0.1'), )

# Google analytics code
GOOGLE_ANALYTICS_ID = get_var('LORE_GOOGLE_ANALYTICS_ID', None)
3 changes: 3 additions & 0 deletions requirements.txt
Expand Up @@ -4,6 +4,8 @@ Django==1.8.4
django-appconf==1.0.1
django-bootstrap3==6.2.2
django-compressor==1.5
django-debug-toolbar==1.3.2
django-elasticsearch-debug-toolbar==0.1.15
django-haystack==2.4.0
djangorestframework==3.2.2
dj-database-url==0.3.0
Expand All @@ -19,6 +21,7 @@ static3==0.6.1
tox>=2.0.2,<3.0.0
uwsgi==2.0.11.1
six==1.9.0
sqlparse==0.1.16
statsd==3.1
git+https://github.com/mitodl/django-settings-export@feature/py3_readme#egg=django-settings-export==1.0.5-odl

Expand Down

0 comments on commit 728cf6b

Please sign in to comment.