Last active
January 18, 2016 06:26
-
-
Save dasvador/74c925d64c2c1c49e96b to your computer and use it in GitHub Desktop.
Query Execute Analytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HOW TO DJANGO Debug Toolbar Install | |
# 1.Required library install | |
pip install django-debug-toolbar | |
pip install django-debug-toolbar-template-timings | |
# 2. Create Another settings file from settins.py clone (exam - settings_dev.py) | |
# 3. Configuration settings_dev.py | |
INSTALLED_APPS = ( | |
.... | |
'debug_toolbar', | |
'template_timings_panel', | |
) | |
... | |
... | |
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', | |
'template_timings_panel.panels.TemplateTimings.TemplateTimings', | |
] | |
# 4. Edit Pycharm configuration | |
# 5. Run and View in Chrome 127.0.0.1:8000 | |
# View Execute Query With Django ORM | |
# 1. Start django shell with below | |
./manage.py shell_plus --print-sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment