Created
July 9, 2011 11:09
-
-
Save jezdez/1073519 to your computer and use it in GitHub Desktop.
Example for app instance kwargs: https://github.com/jezdez/django/commit/46c8ca439f5d8f610080c689c6a399bf88406e12
This file contains hidden or 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
| # ... | |
| def custom_show_toolbar(request): | |
| return True # Always show toolbar, for example purposes only. | |
| INSTALLED_APPS = ( | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.sites', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', | |
| ('debug_toolbar', { | |
| 'intercept_redirects': False, | |
| 'show_toolbar_callback': custom_show_toolbar, | |
| 'extra_signals': ['myproject.signals.MySignal'], | |
| 'hide_django_sql': False, | |
| 'tag': 'div', | |
| }), | |
| ) | |
| ## debug_toolbar could then use the debug_toolbar app instance itself to get app settings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment