From 709616ba3729a369e094c44c35779d817bc20d31 Mon Sep 17 00:00:00 2001 From: Michael Hernandez Date: Tue, 8 Jan 2013 13:48:45 -0500 Subject: [PATCH 1/9] Changed paths from debug_toolbar to debug_toolbar_ajax --- .tx/config | 4 +- debug_toolbar/locale/en/LC_MESSAGES/django.po | 204 +++++++++--------- debug_toolbar/middleware.py | 6 +- example/settings.py | 28 +-- runtests.py | 4 +- setup.py | 2 +- 6 files changed, 124 insertions(+), 124 deletions(-) diff --git a/.tx/config b/.tx/config index 2a28dae99..0fc76723b 100644 --- a/.tx/config +++ b/.tx/config @@ -3,7 +3,7 @@ host = https://www.transifex.net lang_map = sr@latin:sr_Latn [django-debug-toolbar.master] -file_filter = debug_toolbar/locale//LC_MESSAGES/django.po -source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po +file_filter = debug_toolbar_ajax/locale//LC_MESSAGES/django.po +source_file = debug_toolbar_ajax/locale/en/LC_MESSAGES/django.po source_lang = en diff --git a/debug_toolbar/locale/en/LC_MESSAGES/django.po b/debug_toolbar/locale/en/LC_MESSAGES/django.po index 04f8a9c68..f8d196265 100644 --- a/debug_toolbar/locale/en/LC_MESSAGES/django.po +++ b/debug_toolbar/locale/en/LC_MESSAGES/django.po @@ -147,11 +147,11 @@ msgstr "Templates" msgid "Templates (%(num_templates)s rendered)" msgstr "Templates (%(num_templates)s rendered)" -#: panels/timer.py:58 templates/debug_toolbar/panels/cache.html:39 -#: templates/debug_toolbar/panels/logger.html:7 -#: templates/debug_toolbar/panels/sql_explain.html:11 -#: templates/debug_toolbar/panels/sql_profile.html:12 -#: templates/debug_toolbar/panels/sql_select.html:11 +#: panels/timer.py:58 templates/debug_toolbar_ajax/panels/cache.html:39 +#: templates/debug_toolbar_ajax/panels/logger.html:7 +#: templates/debug_toolbar_ajax/panels/sql_explain.html:11 +#: templates/debug_toolbar_ajax/panels/sql_profile.html:12 +#: templates/debug_toolbar_ajax/panels/sql_select.html:11 msgid "Time" msgstr "Time" @@ -218,328 +218,328 @@ msgstr "%(vcsw)d voluntary, %(ivcsw)d involuntary" msgid "Versions" msgstr "Versions" -#: templates/debug_toolbar/base.html:11 +#: templates/debug_toolbar_ajax/base.html:11 msgid "Hide Toolbar" msgstr "Hide Toolbar" -#: templates/debug_toolbar/base.html:11 +#: templates/debug_toolbar_ajax/base.html:11 msgid "Hide" msgstr "Hide" -#: templates/debug_toolbar/base.html:36 +#: templates/debug_toolbar_ajax/base.html:36 msgid "Show Toolbar" msgstr "Show Toolbar" -#: templates/debug_toolbar/base.html:42 +#: templates/debug_toolbar_ajax/base.html:42 msgid "Close" msgstr "Close" -#: templates/debug_toolbar/redirect.html:7 -#: templates/debug_toolbar/panels/logger.html:10 +#: templates/debug_toolbar_ajax/redirect.html:7 +#: templates/debug_toolbar_ajax/panels/logger.html:10 msgid "Location" msgstr "Location" -#: templates/debug_toolbar/redirect.html:9 -msgid "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the DEBUG_TOOLBAR_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." -msgstr "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the DEBUG_TOOLBAR_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." +#: templates/debug_toolbar_ajax/redirect.html:9 +msgid "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the debug_toolbar_ajax_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." +msgstr "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the debug_toolbar_ajax_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." -#: templates/debug_toolbar/panels/cache.html:14 +#: templates/debug_toolbar_ajax/panels/cache.html:14 msgid "Total Calls" msgstr "Total Calls" -#: templates/debug_toolbar/panels/cache.html:16 +#: templates/debug_toolbar_ajax/panels/cache.html:16 msgid "Total Time" msgstr "Total Time" -#: templates/debug_toolbar/panels/cache.html:18 +#: templates/debug_toolbar_ajax/panels/cache.html:18 msgid "Hits" msgstr "Hits" -#: templates/debug_toolbar/panels/cache.html:20 +#: templates/debug_toolbar_ajax/panels/cache.html:20 msgid "Misses" msgstr "Misses" -#: templates/debug_toolbar/panels/cache.html:35 +#: templates/debug_toolbar_ajax/panels/cache.html:35 msgid "Breakdown" msgstr "Breakdown" -#: templates/debug_toolbar/panels/cache.html:40 +#: templates/debug_toolbar_ajax/panels/cache.html:40 msgid "Type" msgstr "Type" -#: templates/debug_toolbar/panels/cache.html:41 +#: templates/debug_toolbar_ajax/panels/cache.html:41 msgid "Function" msgstr "Function" -#: templates/debug_toolbar/panels/cache.html:42 -#: templates/debug_toolbar/panels/request_vars.html:8 +#: templates/debug_toolbar_ajax/panels/cache.html:42 +#: templates/debug_toolbar_ajax/panels/request_vars.html:8 msgid "args" msgstr "args" -#: templates/debug_toolbar/panels/cache.html:43 -#: templates/debug_toolbar/panels/request_vars.html:9 +#: templates/debug_toolbar_ajax/panels/cache.html:43 +#: templates/debug_toolbar_ajax/panels/request_vars.html:9 msgid "kwargs" msgstr "kwargs" -#: templates/debug_toolbar/panels/headers.html:5 +#: templates/debug_toolbar_ajax/panels/headers.html:5 msgid "Key" msgstr "Key" -#: templates/debug_toolbar/panels/headers.html:6 -#: templates/debug_toolbar/panels/request_vars.html:39 -#: templates/debug_toolbar/panels/request_vars.html:65 -#: templates/debug_toolbar/panels/request_vars.html:87 -#: templates/debug_toolbar/panels/request_vars.html:109 -#: templates/debug_toolbar/panels/settings_vars.html:6 -#: templates/debug_toolbar/panels/timer.html:10 +#: templates/debug_toolbar_ajax/panels/headers.html:6 +#: templates/debug_toolbar_ajax/panels/request_vars.html:39 +#: templates/debug_toolbar_ajax/panels/request_vars.html:65 +#: templates/debug_toolbar_ajax/panels/request_vars.html:87 +#: templates/debug_toolbar_ajax/panels/request_vars.html:109 +#: templates/debug_toolbar_ajax/panels/settings_vars.html:6 +#: templates/debug_toolbar_ajax/panels/timer.html:10 msgid "Value" msgstr "Value" -#: templates/debug_toolbar/panels/logger.html:6 +#: templates/debug_toolbar_ajax/panels/logger.html:6 msgid "Level" msgstr "Level" -#: templates/debug_toolbar/panels/logger.html:8 +#: templates/debug_toolbar_ajax/panels/logger.html:8 msgid "Channel" msgstr "Channel" -#: templates/debug_toolbar/panels/logger.html:9 +#: templates/debug_toolbar_ajax/panels/logger.html:9 msgid "Message" msgstr "Message" -#: templates/debug_toolbar/panels/logger.html:26 +#: templates/debug_toolbar_ajax/panels/logger.html:26 msgid "No messages logged" msgstr "No messages logged" -#: templates/debug_toolbar/panels/profiling.html:6 +#: templates/debug_toolbar_ajax/panels/profiling.html:6 msgid "Call" msgstr "Call" -#: templates/debug_toolbar/panels/profiling.html:7 +#: templates/debug_toolbar_ajax/panels/profiling.html:7 msgid "CumTime" msgstr "CumTime" -#: templates/debug_toolbar/panels/profiling.html:8 -#: templates/debug_toolbar/panels/profiling.html:10 +#: templates/debug_toolbar_ajax/panels/profiling.html:8 +#: templates/debug_toolbar_ajax/panels/profiling.html:10 msgid "Per" msgstr "Per" -#: templates/debug_toolbar/panels/profiling.html:9 +#: templates/debug_toolbar_ajax/panels/profiling.html:9 msgid "TotTime" msgstr "TotTime" -#: templates/debug_toolbar/panels/profiling.html:11 +#: templates/debug_toolbar_ajax/panels/profiling.html:11 msgid "Count" msgstr "Count" -#: templates/debug_toolbar/panels/request_vars.html:3 +#: templates/debug_toolbar_ajax/panels/request_vars.html:3 msgid "View information" msgstr "View information" -#: templates/debug_toolbar/panels/request_vars.html:7 +#: templates/debug_toolbar_ajax/panels/request_vars.html:7 msgid "View Function" msgstr "View Function" -#: templates/debug_toolbar/panels/request_vars.html:29 +#: templates/debug_toolbar_ajax/panels/request_vars.html:29 msgid "COOKIES Variables" msgstr "COOKIES Variables" -#: templates/debug_toolbar/panels/request_vars.html:38 -#: templates/debug_toolbar/panels/request_vars.html:64 -#: templates/debug_toolbar/panels/request_vars.html:86 -#: templates/debug_toolbar/panels/request_vars.html:108 +#: templates/debug_toolbar_ajax/panels/request_vars.html:38 +#: templates/debug_toolbar_ajax/panels/request_vars.html:64 +#: templates/debug_toolbar_ajax/panels/request_vars.html:86 +#: templates/debug_toolbar_ajax/panels/request_vars.html:108 msgid "Variable" msgstr "Variable" -#: templates/debug_toolbar/panels/request_vars.html:52 +#: templates/debug_toolbar_ajax/panels/request_vars.html:52 msgid "No COOKIE data" msgstr "No COOKIE data" -#: templates/debug_toolbar/panels/request_vars.html:55 +#: templates/debug_toolbar_ajax/panels/request_vars.html:55 msgid "SESSION Variables" msgstr "SESSION Variables" -#: templates/debug_toolbar/panels/request_vars.html:78 +#: templates/debug_toolbar_ajax/panels/request_vars.html:78 msgid "No SESSION data" msgstr "No SESSION data" -#: templates/debug_toolbar/panels/request_vars.html:81 +#: templates/debug_toolbar_ajax/panels/request_vars.html:81 msgid "GET Variables" msgstr "GET Variables" -#: templates/debug_toolbar/panels/request_vars.html:100 +#: templates/debug_toolbar_ajax/panels/request_vars.html:100 msgid "No GET data" msgstr "No GET data" -#: templates/debug_toolbar/panels/request_vars.html:103 +#: templates/debug_toolbar_ajax/panels/request_vars.html:103 msgid "POST Variables" msgstr "POST Variables" -#: templates/debug_toolbar/panels/request_vars.html:122 +#: templates/debug_toolbar_ajax/panels/request_vars.html:122 msgid "No POST data" msgstr "No POST data" -#: templates/debug_toolbar/panels/settings_vars.html:5 +#: templates/debug_toolbar_ajax/panels/settings_vars.html:5 msgid "Setting" msgstr "Setting" -#: templates/debug_toolbar/panels/signals.html:5 +#: templates/debug_toolbar_ajax/panels/signals.html:5 msgid "Signal" msgstr "Signal" -#: templates/debug_toolbar/panels/signals.html:6 +#: templates/debug_toolbar_ajax/panels/signals.html:6 msgid "Providing Args" msgstr "Providing Args" -#: templates/debug_toolbar/panels/signals.html:7 +#: templates/debug_toolbar_ajax/panels/signals.html:7 msgid "Receivers" msgstr "Receivers" -#: templates/debug_toolbar/panels/sql.html:8 +#: templates/debug_toolbar_ajax/panels/sql.html:8 #, python-format msgid "%(num)s query" msgid_plural "%(num)s queries" msgstr[0] "%(num)s query" msgstr[1] "%(num)s queries" -#: templates/debug_toolbar/panels/sql.html:19 +#: templates/debug_toolbar_ajax/panels/sql.html:19 msgid "Query" msgstr "Query" -#: templates/debug_toolbar/panels/sql.html:20 +#: templates/debug_toolbar_ajax/panels/sql.html:20 msgid "Timeline" msgstr "Timeline" -#: templates/debug_toolbar/panels/sql.html:21 +#: templates/debug_toolbar_ajax/panels/sql.html:21 msgid "Time (ms)" msgstr "Time (ms)" -#: templates/debug_toolbar/panels/sql.html:22 +#: templates/debug_toolbar_ajax/panels/sql.html:22 msgid "Action" msgstr "Action" -#: templates/debug_toolbar/panels/sql.html:59 +#: templates/debug_toolbar_ajax/panels/sql.html:59 msgid "Connection:" msgstr "Connection:" -#: templates/debug_toolbar/panels/sql.html:61 +#: templates/debug_toolbar_ajax/panels/sql.html:61 msgid "Isolation level:" msgstr "Isolation level:" -#: templates/debug_toolbar/panels/sql.html:64 +#: templates/debug_toolbar_ajax/panels/sql.html:64 msgid "Transaction status:" msgstr "Transaction status:" -#: templates/debug_toolbar/panels/sql.html:78 +#: templates/debug_toolbar_ajax/panels/sql.html:78 msgid "(unknown)" msgstr "(unknown)" -#: templates/debug_toolbar/panels/sql.html:87 +#: templates/debug_toolbar_ajax/panels/sql.html:87 msgid "No SQL queries were recorded during this request." msgstr "No SQL queries were recorded during this request." -#: templates/debug_toolbar/panels/sql_explain.html:3 -#: templates/debug_toolbar/panels/sql_profile.html:3 -#: templates/debug_toolbar/panels/sql_select.html:3 -#: templates/debug_toolbar/panels/template_source.html:3 +#: templates/debug_toolbar_ajax/panels/sql_explain.html:3 +#: templates/debug_toolbar_ajax/panels/sql_profile.html:3 +#: templates/debug_toolbar_ajax/panels/sql_select.html:3 +#: templates/debug_toolbar_ajax/panels/template_source.html:3 msgid "Back" msgstr "Back" -#: templates/debug_toolbar/panels/sql_explain.html:4 +#: templates/debug_toolbar_ajax/panels/sql_explain.html:4 msgid "SQL Explained" msgstr "SQL Explained" -#: templates/debug_toolbar/panels/sql_explain.html:9 -#: templates/debug_toolbar/panels/sql_profile.html:10 -#: templates/debug_toolbar/panels/sql_select.html:9 +#: templates/debug_toolbar_ajax/panels/sql_explain.html:9 +#: templates/debug_toolbar_ajax/panels/sql_profile.html:10 +#: templates/debug_toolbar_ajax/panels/sql_select.html:9 msgid "Executed SQL" msgstr "Executed SQL" -#: templates/debug_toolbar/panels/sql_explain.html:13 -#: templates/debug_toolbar/panels/sql_profile.html:14 -#: templates/debug_toolbar/panels/sql_select.html:13 +#: templates/debug_toolbar_ajax/panels/sql_explain.html:13 +#: templates/debug_toolbar_ajax/panels/sql_profile.html:14 +#: templates/debug_toolbar_ajax/panels/sql_select.html:13 msgid "Database" msgstr "Database" -#: templates/debug_toolbar/panels/sql_profile.html:4 +#: templates/debug_toolbar_ajax/panels/sql_profile.html:4 msgid "SQL Profiled" msgstr "SQL Profiled" -#: templates/debug_toolbar/panels/sql_profile.html:37 +#: templates/debug_toolbar_ajax/panels/sql_profile.html:37 msgid "Error" msgstr "Error" -#: templates/debug_toolbar/panels/sql_select.html:4 +#: templates/debug_toolbar_ajax/panels/sql_select.html:4 msgid "SQL Selected" msgstr "SQL Selected" -#: templates/debug_toolbar/panels/sql_select.html:36 +#: templates/debug_toolbar_ajax/panels/sql_select.html:36 msgid "Empty set" msgstr "Empty set" -#: templates/debug_toolbar/panels/staticfiles.html:5 +#: templates/debug_toolbar_ajax/panels/staticfiles.html:5 msgid "Static path" msgid_plural "Static paths" msgstr[0] "" msgstr[1] "" -#: templates/debug_toolbar/panels/staticfiles.html:13 +#: templates/debug_toolbar_ajax/panels/staticfiles.html:13 #, fuzzy, python-format msgid "%(file_count)s file" msgid_plural "%(file_count)s files" msgstr[0] "%(count)s message" msgstr[1] "%(count)s messages" -#: templates/debug_toolbar/panels/staticfiles.html:17 +#: templates/debug_toolbar_ajax/panels/staticfiles.html:17 msgid "Path" msgstr "" -#: templates/debug_toolbar/panels/staticfiles.html:18 +#: templates/debug_toolbar_ajax/panels/staticfiles.html:18 msgid "Storage" msgstr "" -#: templates/debug_toolbar/panels/template_source.html:4 +#: templates/debug_toolbar_ajax/panels/template_source.html:4 msgid "Template Source" msgstr "Template Source" -#: templates/debug_toolbar/panels/templates.html:2 +#: templates/debug_toolbar_ajax/panels/templates.html:2 msgid "Template path" msgid_plural "Template paths" msgstr[0] "Template path" msgstr[1] "Template path" -#: templates/debug_toolbar/panels/templates.html:10 -#: templates/debug_toolbar/panels/templates.html:28 -#: templates/debug_toolbar/panels/templates.html:43 +#: templates/debug_toolbar_ajax/panels/templates.html:10 +#: templates/debug_toolbar_ajax/panels/templates.html:28 +#: templates/debug_toolbar_ajax/panels/templates.html:43 msgid "None" msgstr "None" -#: templates/debug_toolbar/panels/templates.html:13 +#: templates/debug_toolbar_ajax/panels/templates.html:13 msgid "Template" msgid_plural "Templates" msgstr[0] "Template" msgstr[1] "Template" -#: templates/debug_toolbar/panels/templates.html:21 -#: templates/debug_toolbar/panels/templates.html:37 +#: templates/debug_toolbar_ajax/panels/templates.html:21 +#: templates/debug_toolbar_ajax/panels/templates.html:37 msgid "Toggle Context" msgstr "Toggle Context" -#: templates/debug_toolbar/panels/templates.html:31 +#: templates/debug_toolbar_ajax/panels/templates.html:31 msgid "Context processor" msgid_plural "Context processors" msgstr[0] "Context processor" msgstr[1] "Context processor" -#: templates/debug_toolbar/panels/timer.html:9 +#: templates/debug_toolbar_ajax/panels/timer.html:9 msgid "Resource" msgstr "Resource" -#: templates/debug_toolbar/panels/versions.html:5 +#: templates/debug_toolbar_ajax/panels/versions.html:5 msgid "Name" msgstr "" -#: templates/debug_toolbar/panels/versions.html:6 +#: templates/debug_toolbar_ajax/panels/versions.html:6 msgid "Version" msgstr "Version" diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index 1979e1d63..1323ae14c 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -10,8 +10,8 @@ from django.utils.encoding import smart_unicode from django.utils.importlib import import_module -import debug_toolbar.urls -from debug_toolbar.toolbar.loader import DebugToolbar +import debug_toolbar_ajax.urls +from debug_toolbar_ajax.toolbar.loader import DebugToolbar _HTML_TYPES = ('text/html', 'application/xhtml+xml') @@ -81,7 +81,7 @@ def process_request(self, request): if urlconf not in self._urlconfs: new_urlconf = imp.new_module('urlconf') - new_urlconf.urlpatterns = debug_toolbar.urls.urlpatterns + \ + new_urlconf.urlpatterns = debug_toolbar_ajax.urls.urlpatterns + \ list(urlconf.urlpatterns) if hasattr(urlconf, 'handler403'): diff --git a/example/settings.py b/example/settings.py index 6fa3e56ba..a77b089d0 100644 --- a/example/settings.py +++ b/example/settings.py @@ -12,7 +12,7 @@ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', - 'debug_toolbar', + 'debug_toolbar_ajax', ) INTERNAL_IPS = ('127.0.0.1',) MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') @@ -23,7 +23,7 @@ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'debug_toolbar.middleware.DebugToolbarMiddleware', + 'debug_toolbar_ajax.middleware.DebugToolbarMiddleware', ) ROOT_URLCONF = 'example.urls' SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcd' @@ -37,18 +37,18 @@ TEMPLATE_DIRS = ( os.path.join(PROJECT_PATH, 'templates'), ) -DEBUG_TOOLBAR_PANELS = ( - 'debug_toolbar.panels.version.VersionDebugPanel', - 'debug_toolbar.panels.timer.TimerDebugPanel', - 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', - 'debug_toolbar.panels.headers.HeaderDebugPanel', - 'debug_toolbar.panels.profiling.ProfilingDebugPanel', - 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', - 'debug_toolbar.panels.sql.SQLDebugPanel', - 'debug_toolbar.panels.template.TemplateDebugPanel', - 'debug_toolbar.panels.cache.CacheDebugPanel', - 'debug_toolbar.panels.signals.SignalDebugPanel', - 'debug_toolbar.panels.logger.LoggingPanel', +debug_toolbar_ajax_PANELS = ( + 'debug_toolbar_ajax.panels.version.VersionDebugPanel', + 'debug_toolbar_ajax.panels.timer.TimerDebugPanel', + 'debug_toolbar_ajax.panels.settings_vars.SettingsVarsDebugPanel', + 'debug_toolbar_ajax.panels.headers.HeaderDebugPanel', + 'debug_toolbar_ajax.panels.profiling.ProfilingDebugPanel', + 'debug_toolbar_ajax.panels.request_vars.RequestVarsDebugPanel', + 'debug_toolbar_ajax.panels.sql.SQLDebugPanel', + 'debug_toolbar_ajax.panels.template.TemplateDebugPanel', + 'debug_toolbar_ajax.panels.cache.CacheDebugPanel', + 'debug_toolbar_ajax.panels.signals.SignalDebugPanel', + 'debug_toolbar_ajax.panels.logger.LoggingPanel', ) CACHE_BACKEND = 'dummy://' diff --git a/runtests.py b/runtests.py index 3432f8b8c..0c1221023 100644 --- a/runtests.py +++ b/runtests.py @@ -19,12 +19,12 @@ 'django.contrib.sessions', 'django.contrib.sites', - 'debug_toolbar', + 'debug_toolbar_ajax', 'tests', ], MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES + ( - 'debug_toolbar.middleware.DebugToolbarMiddleware', + 'debug_toolbar_ajax.middleware.DebugToolbarMiddleware', ), ROOT_URLCONF='', DEBUG=False, diff --git a/setup.py b/setup.py index ea402391a..b6c9412e9 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( - name='django-debug-toolbar', + name='django-debug-toolbar-ajax', version='0.9.4', description='A configurable set of panels that display various debug information about the current request/response.', long_description=open('README.rst').read(), From 2918905b33f9a10d4e02582a7976f535d46f5b6f Mon Sep 17 00:00:00 2001 From: Michael Hernandez Date: Tue, 8 Jan 2013 13:51:03 -0500 Subject: [PATCH 2/9] Revert "Changed paths from debug_toolbar to debug_toolbar_ajax" This reverts commit 709616ba3729a369e094c44c35779d817bc20d31. --- .tx/config | 4 +- debug_toolbar/locale/en/LC_MESSAGES/django.po | 204 +++++++++--------- debug_toolbar/middleware.py | 6 +- example/settings.py | 28 +-- runtests.py | 4 +- setup.py | 2 +- 6 files changed, 124 insertions(+), 124 deletions(-) diff --git a/.tx/config b/.tx/config index 0fc76723b..2a28dae99 100644 --- a/.tx/config +++ b/.tx/config @@ -3,7 +3,7 @@ host = https://www.transifex.net lang_map = sr@latin:sr_Latn [django-debug-toolbar.master] -file_filter = debug_toolbar_ajax/locale//LC_MESSAGES/django.po -source_file = debug_toolbar_ajax/locale/en/LC_MESSAGES/django.po +file_filter = debug_toolbar/locale//LC_MESSAGES/django.po +source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po source_lang = en diff --git a/debug_toolbar/locale/en/LC_MESSAGES/django.po b/debug_toolbar/locale/en/LC_MESSAGES/django.po index f8d196265..04f8a9c68 100644 --- a/debug_toolbar/locale/en/LC_MESSAGES/django.po +++ b/debug_toolbar/locale/en/LC_MESSAGES/django.po @@ -147,11 +147,11 @@ msgstr "Templates" msgid "Templates (%(num_templates)s rendered)" msgstr "Templates (%(num_templates)s rendered)" -#: panels/timer.py:58 templates/debug_toolbar_ajax/panels/cache.html:39 -#: templates/debug_toolbar_ajax/panels/logger.html:7 -#: templates/debug_toolbar_ajax/panels/sql_explain.html:11 -#: templates/debug_toolbar_ajax/panels/sql_profile.html:12 -#: templates/debug_toolbar_ajax/panels/sql_select.html:11 +#: panels/timer.py:58 templates/debug_toolbar/panels/cache.html:39 +#: templates/debug_toolbar/panels/logger.html:7 +#: templates/debug_toolbar/panels/sql_explain.html:11 +#: templates/debug_toolbar/panels/sql_profile.html:12 +#: templates/debug_toolbar/panels/sql_select.html:11 msgid "Time" msgstr "Time" @@ -218,328 +218,328 @@ msgstr "%(vcsw)d voluntary, %(ivcsw)d involuntary" msgid "Versions" msgstr "Versions" -#: templates/debug_toolbar_ajax/base.html:11 +#: templates/debug_toolbar/base.html:11 msgid "Hide Toolbar" msgstr "Hide Toolbar" -#: templates/debug_toolbar_ajax/base.html:11 +#: templates/debug_toolbar/base.html:11 msgid "Hide" msgstr "Hide" -#: templates/debug_toolbar_ajax/base.html:36 +#: templates/debug_toolbar/base.html:36 msgid "Show Toolbar" msgstr "Show Toolbar" -#: templates/debug_toolbar_ajax/base.html:42 +#: templates/debug_toolbar/base.html:42 msgid "Close" msgstr "Close" -#: templates/debug_toolbar_ajax/redirect.html:7 -#: templates/debug_toolbar_ajax/panels/logger.html:10 +#: templates/debug_toolbar/redirect.html:7 +#: templates/debug_toolbar/panels/logger.html:10 msgid "Location" msgstr "Location" -#: templates/debug_toolbar_ajax/redirect.html:9 -msgid "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the debug_toolbar_ajax_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." -msgstr "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the debug_toolbar_ajax_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." +#: templates/debug_toolbar/redirect.html:9 +msgid "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the DEBUG_TOOLBAR_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." +msgstr "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal. If you'd like to disable this feature, set the DEBUG_TOOLBAR_CONFIG dictionary's key INTERCEPT_REDIRECTS to False." -#: templates/debug_toolbar_ajax/panels/cache.html:14 +#: templates/debug_toolbar/panels/cache.html:14 msgid "Total Calls" msgstr "Total Calls" -#: templates/debug_toolbar_ajax/panels/cache.html:16 +#: templates/debug_toolbar/panels/cache.html:16 msgid "Total Time" msgstr "Total Time" -#: templates/debug_toolbar_ajax/panels/cache.html:18 +#: templates/debug_toolbar/panels/cache.html:18 msgid "Hits" msgstr "Hits" -#: templates/debug_toolbar_ajax/panels/cache.html:20 +#: templates/debug_toolbar/panels/cache.html:20 msgid "Misses" msgstr "Misses" -#: templates/debug_toolbar_ajax/panels/cache.html:35 +#: templates/debug_toolbar/panels/cache.html:35 msgid "Breakdown" msgstr "Breakdown" -#: templates/debug_toolbar_ajax/panels/cache.html:40 +#: templates/debug_toolbar/panels/cache.html:40 msgid "Type" msgstr "Type" -#: templates/debug_toolbar_ajax/panels/cache.html:41 +#: templates/debug_toolbar/panels/cache.html:41 msgid "Function" msgstr "Function" -#: templates/debug_toolbar_ajax/panels/cache.html:42 -#: templates/debug_toolbar_ajax/panels/request_vars.html:8 +#: templates/debug_toolbar/panels/cache.html:42 +#: templates/debug_toolbar/panels/request_vars.html:8 msgid "args" msgstr "args" -#: templates/debug_toolbar_ajax/panels/cache.html:43 -#: templates/debug_toolbar_ajax/panels/request_vars.html:9 +#: templates/debug_toolbar/panels/cache.html:43 +#: templates/debug_toolbar/panels/request_vars.html:9 msgid "kwargs" msgstr "kwargs" -#: templates/debug_toolbar_ajax/panels/headers.html:5 +#: templates/debug_toolbar/panels/headers.html:5 msgid "Key" msgstr "Key" -#: templates/debug_toolbar_ajax/panels/headers.html:6 -#: templates/debug_toolbar_ajax/panels/request_vars.html:39 -#: templates/debug_toolbar_ajax/panels/request_vars.html:65 -#: templates/debug_toolbar_ajax/panels/request_vars.html:87 -#: templates/debug_toolbar_ajax/panels/request_vars.html:109 -#: templates/debug_toolbar_ajax/panels/settings_vars.html:6 -#: templates/debug_toolbar_ajax/panels/timer.html:10 +#: templates/debug_toolbar/panels/headers.html:6 +#: templates/debug_toolbar/panels/request_vars.html:39 +#: templates/debug_toolbar/panels/request_vars.html:65 +#: templates/debug_toolbar/panels/request_vars.html:87 +#: templates/debug_toolbar/panels/request_vars.html:109 +#: templates/debug_toolbar/panels/settings_vars.html:6 +#: templates/debug_toolbar/panels/timer.html:10 msgid "Value" msgstr "Value" -#: templates/debug_toolbar_ajax/panels/logger.html:6 +#: templates/debug_toolbar/panels/logger.html:6 msgid "Level" msgstr "Level" -#: templates/debug_toolbar_ajax/panels/logger.html:8 +#: templates/debug_toolbar/panels/logger.html:8 msgid "Channel" msgstr "Channel" -#: templates/debug_toolbar_ajax/panels/logger.html:9 +#: templates/debug_toolbar/panels/logger.html:9 msgid "Message" msgstr "Message" -#: templates/debug_toolbar_ajax/panels/logger.html:26 +#: templates/debug_toolbar/panels/logger.html:26 msgid "No messages logged" msgstr "No messages logged" -#: templates/debug_toolbar_ajax/panels/profiling.html:6 +#: templates/debug_toolbar/panels/profiling.html:6 msgid "Call" msgstr "Call" -#: templates/debug_toolbar_ajax/panels/profiling.html:7 +#: templates/debug_toolbar/panels/profiling.html:7 msgid "CumTime" msgstr "CumTime" -#: templates/debug_toolbar_ajax/panels/profiling.html:8 -#: templates/debug_toolbar_ajax/panels/profiling.html:10 +#: templates/debug_toolbar/panels/profiling.html:8 +#: templates/debug_toolbar/panels/profiling.html:10 msgid "Per" msgstr "Per" -#: templates/debug_toolbar_ajax/panels/profiling.html:9 +#: templates/debug_toolbar/panels/profiling.html:9 msgid "TotTime" msgstr "TotTime" -#: templates/debug_toolbar_ajax/panels/profiling.html:11 +#: templates/debug_toolbar/panels/profiling.html:11 msgid "Count" msgstr "Count" -#: templates/debug_toolbar_ajax/panels/request_vars.html:3 +#: templates/debug_toolbar/panels/request_vars.html:3 msgid "View information" msgstr "View information" -#: templates/debug_toolbar_ajax/panels/request_vars.html:7 +#: templates/debug_toolbar/panels/request_vars.html:7 msgid "View Function" msgstr "View Function" -#: templates/debug_toolbar_ajax/panels/request_vars.html:29 +#: templates/debug_toolbar/panels/request_vars.html:29 msgid "COOKIES Variables" msgstr "COOKIES Variables" -#: templates/debug_toolbar_ajax/panels/request_vars.html:38 -#: templates/debug_toolbar_ajax/panels/request_vars.html:64 -#: templates/debug_toolbar_ajax/panels/request_vars.html:86 -#: templates/debug_toolbar_ajax/panels/request_vars.html:108 +#: templates/debug_toolbar/panels/request_vars.html:38 +#: templates/debug_toolbar/panels/request_vars.html:64 +#: templates/debug_toolbar/panels/request_vars.html:86 +#: templates/debug_toolbar/panels/request_vars.html:108 msgid "Variable" msgstr "Variable" -#: templates/debug_toolbar_ajax/panels/request_vars.html:52 +#: templates/debug_toolbar/panels/request_vars.html:52 msgid "No COOKIE data" msgstr "No COOKIE data" -#: templates/debug_toolbar_ajax/panels/request_vars.html:55 +#: templates/debug_toolbar/panels/request_vars.html:55 msgid "SESSION Variables" msgstr "SESSION Variables" -#: templates/debug_toolbar_ajax/panels/request_vars.html:78 +#: templates/debug_toolbar/panels/request_vars.html:78 msgid "No SESSION data" msgstr "No SESSION data" -#: templates/debug_toolbar_ajax/panels/request_vars.html:81 +#: templates/debug_toolbar/panels/request_vars.html:81 msgid "GET Variables" msgstr "GET Variables" -#: templates/debug_toolbar_ajax/panels/request_vars.html:100 +#: templates/debug_toolbar/panels/request_vars.html:100 msgid "No GET data" msgstr "No GET data" -#: templates/debug_toolbar_ajax/panels/request_vars.html:103 +#: templates/debug_toolbar/panels/request_vars.html:103 msgid "POST Variables" msgstr "POST Variables" -#: templates/debug_toolbar_ajax/panels/request_vars.html:122 +#: templates/debug_toolbar/panels/request_vars.html:122 msgid "No POST data" msgstr "No POST data" -#: templates/debug_toolbar_ajax/panels/settings_vars.html:5 +#: templates/debug_toolbar/panels/settings_vars.html:5 msgid "Setting" msgstr "Setting" -#: templates/debug_toolbar_ajax/panels/signals.html:5 +#: templates/debug_toolbar/panels/signals.html:5 msgid "Signal" msgstr "Signal" -#: templates/debug_toolbar_ajax/panels/signals.html:6 +#: templates/debug_toolbar/panels/signals.html:6 msgid "Providing Args" msgstr "Providing Args" -#: templates/debug_toolbar_ajax/panels/signals.html:7 +#: templates/debug_toolbar/panels/signals.html:7 msgid "Receivers" msgstr "Receivers" -#: templates/debug_toolbar_ajax/panels/sql.html:8 +#: templates/debug_toolbar/panels/sql.html:8 #, python-format msgid "%(num)s query" msgid_plural "%(num)s queries" msgstr[0] "%(num)s query" msgstr[1] "%(num)s queries" -#: templates/debug_toolbar_ajax/panels/sql.html:19 +#: templates/debug_toolbar/panels/sql.html:19 msgid "Query" msgstr "Query" -#: templates/debug_toolbar_ajax/panels/sql.html:20 +#: templates/debug_toolbar/panels/sql.html:20 msgid "Timeline" msgstr "Timeline" -#: templates/debug_toolbar_ajax/panels/sql.html:21 +#: templates/debug_toolbar/panels/sql.html:21 msgid "Time (ms)" msgstr "Time (ms)" -#: templates/debug_toolbar_ajax/panels/sql.html:22 +#: templates/debug_toolbar/panels/sql.html:22 msgid "Action" msgstr "Action" -#: templates/debug_toolbar_ajax/panels/sql.html:59 +#: templates/debug_toolbar/panels/sql.html:59 msgid "Connection:" msgstr "Connection:" -#: templates/debug_toolbar_ajax/panels/sql.html:61 +#: templates/debug_toolbar/panels/sql.html:61 msgid "Isolation level:" msgstr "Isolation level:" -#: templates/debug_toolbar_ajax/panels/sql.html:64 +#: templates/debug_toolbar/panels/sql.html:64 msgid "Transaction status:" msgstr "Transaction status:" -#: templates/debug_toolbar_ajax/panels/sql.html:78 +#: templates/debug_toolbar/panels/sql.html:78 msgid "(unknown)" msgstr "(unknown)" -#: templates/debug_toolbar_ajax/panels/sql.html:87 +#: templates/debug_toolbar/panels/sql.html:87 msgid "No SQL queries were recorded during this request." msgstr "No SQL queries were recorded during this request." -#: templates/debug_toolbar_ajax/panels/sql_explain.html:3 -#: templates/debug_toolbar_ajax/panels/sql_profile.html:3 -#: templates/debug_toolbar_ajax/panels/sql_select.html:3 -#: templates/debug_toolbar_ajax/panels/template_source.html:3 +#: templates/debug_toolbar/panels/sql_explain.html:3 +#: templates/debug_toolbar/panels/sql_profile.html:3 +#: templates/debug_toolbar/panels/sql_select.html:3 +#: templates/debug_toolbar/panels/template_source.html:3 msgid "Back" msgstr "Back" -#: templates/debug_toolbar_ajax/panels/sql_explain.html:4 +#: templates/debug_toolbar/panels/sql_explain.html:4 msgid "SQL Explained" msgstr "SQL Explained" -#: templates/debug_toolbar_ajax/panels/sql_explain.html:9 -#: templates/debug_toolbar_ajax/panels/sql_profile.html:10 -#: templates/debug_toolbar_ajax/panels/sql_select.html:9 +#: templates/debug_toolbar/panels/sql_explain.html:9 +#: templates/debug_toolbar/panels/sql_profile.html:10 +#: templates/debug_toolbar/panels/sql_select.html:9 msgid "Executed SQL" msgstr "Executed SQL" -#: templates/debug_toolbar_ajax/panels/sql_explain.html:13 -#: templates/debug_toolbar_ajax/panels/sql_profile.html:14 -#: templates/debug_toolbar_ajax/panels/sql_select.html:13 +#: templates/debug_toolbar/panels/sql_explain.html:13 +#: templates/debug_toolbar/panels/sql_profile.html:14 +#: templates/debug_toolbar/panels/sql_select.html:13 msgid "Database" msgstr "Database" -#: templates/debug_toolbar_ajax/panels/sql_profile.html:4 +#: templates/debug_toolbar/panels/sql_profile.html:4 msgid "SQL Profiled" msgstr "SQL Profiled" -#: templates/debug_toolbar_ajax/panels/sql_profile.html:37 +#: templates/debug_toolbar/panels/sql_profile.html:37 msgid "Error" msgstr "Error" -#: templates/debug_toolbar_ajax/panels/sql_select.html:4 +#: templates/debug_toolbar/panels/sql_select.html:4 msgid "SQL Selected" msgstr "SQL Selected" -#: templates/debug_toolbar_ajax/panels/sql_select.html:36 +#: templates/debug_toolbar/panels/sql_select.html:36 msgid "Empty set" msgstr "Empty set" -#: templates/debug_toolbar_ajax/panels/staticfiles.html:5 +#: templates/debug_toolbar/panels/staticfiles.html:5 msgid "Static path" msgid_plural "Static paths" msgstr[0] "" msgstr[1] "" -#: templates/debug_toolbar_ajax/panels/staticfiles.html:13 +#: templates/debug_toolbar/panels/staticfiles.html:13 #, fuzzy, python-format msgid "%(file_count)s file" msgid_plural "%(file_count)s files" msgstr[0] "%(count)s message" msgstr[1] "%(count)s messages" -#: templates/debug_toolbar_ajax/panels/staticfiles.html:17 +#: templates/debug_toolbar/panels/staticfiles.html:17 msgid "Path" msgstr "" -#: templates/debug_toolbar_ajax/panels/staticfiles.html:18 +#: templates/debug_toolbar/panels/staticfiles.html:18 msgid "Storage" msgstr "" -#: templates/debug_toolbar_ajax/panels/template_source.html:4 +#: templates/debug_toolbar/panels/template_source.html:4 msgid "Template Source" msgstr "Template Source" -#: templates/debug_toolbar_ajax/panels/templates.html:2 +#: templates/debug_toolbar/panels/templates.html:2 msgid "Template path" msgid_plural "Template paths" msgstr[0] "Template path" msgstr[1] "Template path" -#: templates/debug_toolbar_ajax/panels/templates.html:10 -#: templates/debug_toolbar_ajax/panels/templates.html:28 -#: templates/debug_toolbar_ajax/panels/templates.html:43 +#: templates/debug_toolbar/panels/templates.html:10 +#: templates/debug_toolbar/panels/templates.html:28 +#: templates/debug_toolbar/panels/templates.html:43 msgid "None" msgstr "None" -#: templates/debug_toolbar_ajax/panels/templates.html:13 +#: templates/debug_toolbar/panels/templates.html:13 msgid "Template" msgid_plural "Templates" msgstr[0] "Template" msgstr[1] "Template" -#: templates/debug_toolbar_ajax/panels/templates.html:21 -#: templates/debug_toolbar_ajax/panels/templates.html:37 +#: templates/debug_toolbar/panels/templates.html:21 +#: templates/debug_toolbar/panels/templates.html:37 msgid "Toggle Context" msgstr "Toggle Context" -#: templates/debug_toolbar_ajax/panels/templates.html:31 +#: templates/debug_toolbar/panels/templates.html:31 msgid "Context processor" msgid_plural "Context processors" msgstr[0] "Context processor" msgstr[1] "Context processor" -#: templates/debug_toolbar_ajax/panels/timer.html:9 +#: templates/debug_toolbar/panels/timer.html:9 msgid "Resource" msgstr "Resource" -#: templates/debug_toolbar_ajax/panels/versions.html:5 +#: templates/debug_toolbar/panels/versions.html:5 msgid "Name" msgstr "" -#: templates/debug_toolbar_ajax/panels/versions.html:6 +#: templates/debug_toolbar/panels/versions.html:6 msgid "Version" msgstr "Version" diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index 1323ae14c..1979e1d63 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -10,8 +10,8 @@ from django.utils.encoding import smart_unicode from django.utils.importlib import import_module -import debug_toolbar_ajax.urls -from debug_toolbar_ajax.toolbar.loader import DebugToolbar +import debug_toolbar.urls +from debug_toolbar.toolbar.loader import DebugToolbar _HTML_TYPES = ('text/html', 'application/xhtml+xml') @@ -81,7 +81,7 @@ def process_request(self, request): if urlconf not in self._urlconfs: new_urlconf = imp.new_module('urlconf') - new_urlconf.urlpatterns = debug_toolbar_ajax.urls.urlpatterns + \ + new_urlconf.urlpatterns = debug_toolbar.urls.urlpatterns + \ list(urlconf.urlpatterns) if hasattr(urlconf, 'handler403'): diff --git a/example/settings.py b/example/settings.py index a77b089d0..6fa3e56ba 100644 --- a/example/settings.py +++ b/example/settings.py @@ -12,7 +12,7 @@ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', - 'debug_toolbar_ajax', + 'debug_toolbar', ) INTERNAL_IPS = ('127.0.0.1',) MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') @@ -23,7 +23,7 @@ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'debug_toolbar_ajax.middleware.DebugToolbarMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', ) ROOT_URLCONF = 'example.urls' SECRET_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcd' @@ -37,18 +37,18 @@ TEMPLATE_DIRS = ( os.path.join(PROJECT_PATH, 'templates'), ) -debug_toolbar_ajax_PANELS = ( - 'debug_toolbar_ajax.panels.version.VersionDebugPanel', - 'debug_toolbar_ajax.panels.timer.TimerDebugPanel', - 'debug_toolbar_ajax.panels.settings_vars.SettingsVarsDebugPanel', - 'debug_toolbar_ajax.panels.headers.HeaderDebugPanel', - 'debug_toolbar_ajax.panels.profiling.ProfilingDebugPanel', - 'debug_toolbar_ajax.panels.request_vars.RequestVarsDebugPanel', - 'debug_toolbar_ajax.panels.sql.SQLDebugPanel', - 'debug_toolbar_ajax.panels.template.TemplateDebugPanel', - 'debug_toolbar_ajax.panels.cache.CacheDebugPanel', - 'debug_toolbar_ajax.panels.signals.SignalDebugPanel', - 'debug_toolbar_ajax.panels.logger.LoggingPanel', +DEBUG_TOOLBAR_PANELS = ( + 'debug_toolbar.panels.version.VersionDebugPanel', + 'debug_toolbar.panels.timer.TimerDebugPanel', + 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', + 'debug_toolbar.panels.headers.HeaderDebugPanel', + 'debug_toolbar.panels.profiling.ProfilingDebugPanel', + 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', + 'debug_toolbar.panels.sql.SQLDebugPanel', + 'debug_toolbar.panels.template.TemplateDebugPanel', + 'debug_toolbar.panels.cache.CacheDebugPanel', + 'debug_toolbar.panels.signals.SignalDebugPanel', + 'debug_toolbar.panels.logger.LoggingPanel', ) CACHE_BACKEND = 'dummy://' diff --git a/runtests.py b/runtests.py index 0c1221023..3432f8b8c 100644 --- a/runtests.py +++ b/runtests.py @@ -19,12 +19,12 @@ 'django.contrib.sessions', 'django.contrib.sites', - 'debug_toolbar_ajax', + 'debug_toolbar', 'tests', ], MIDDLEWARE_CLASSES=global_settings.MIDDLEWARE_CLASSES + ( - 'debug_toolbar_ajax.middleware.DebugToolbarMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', ), ROOT_URLCONF='', DEBUG=False, diff --git a/setup.py b/setup.py index b6c9412e9..ea402391a 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( - name='django-debug-toolbar-ajax', + name='django-debug-toolbar', version='0.9.4', description='A configurable set of panels that display various debug information about the current request/response.', long_description=open('README.rst').read(), From c5463c9a71968b5c6ce1890c6363653e3f70ab2f Mon Sep 17 00:00:00 2001 From: Michael Hernandez Date: Tue, 8 Jan 2013 14:07:32 -0500 Subject: [PATCH 3/9] test --- debug_toolbar/middleware.py | 1 + 1 file changed, 1 insertion(+) diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index 1979e1d63..05545b8e3 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -1,3 +1,4 @@ +#Test Upgrade """ Debug Toolbar middleware """ From 1e50c185c49f973663b01294e60b73791a9aa7ee Mon Sep 17 00:00:00 2001 From: Michael Hernandez Date: Tue, 8 Jan 2013 14:10:14 -0500 Subject: [PATCH 4/9] test upgrade --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ea402391a..8bcd14ae5 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='django-debug-toolbar', - version='0.9.4', + version='0.9.5', description='A configurable set of panels that display various debug information about the current request/response.', long_description=open('README.rst').read(), # Get more strings from http://www.python.org/pypi?:action=list_classifiers From 23026686f5693896167899e9c1a83261cdb95c13 Mon Sep 17 00:00:00 2001 From: Michael Hernandez Date: Wed, 9 Jan 2013 15:06:27 -0500 Subject: [PATCH 5/9] Revised middleware for ajax --- debug_toolbar/middleware.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index 05545b8e3..80647b377 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -99,6 +99,7 @@ def process_request(self, request): toolbar = DebugToolbar(request) for panel in toolbar.panels: panel.process_request(request) + self.__class__.debug_toolbars[thread.get_ident()] = toolbar def process_view(self, request, view_func, view_args, view_kwargs): @@ -116,8 +117,22 @@ def process_view(self, request, view_func, view_args, view_kwargs): def process_response(self, request, response): __traceback_hide__ = True ident = thread.get_ident() + toolbar = self.__class__.debug_toolbars.get(ident) + if not toolbar or request.is_ajax(): + for panel in toolbar.panels: + panel.process_response(request, response) + + rendered = toolbar.render_toolbar() + from django.utils import simplejson + rendered = simplejson.dumps({'rendered':rendered}) + + if '{replace}' not in response.content: + if response.content[-1] == '}': + response.content = response.content[:-1] + ', "replace":"{replace}"}' + + response.content = response.content.replace('"{replace}"', rendered) return response if isinstance(response, HttpResponseRedirect): if not toolbar.config['INTERCEPT_REDIRECTS']: From ecc36dc31a59160e777be6296a45966a776e56d7 Mon Sep 17 00:00:00 2001 From: Michael Hernandez Date: Wed, 9 Jan 2013 15:22:22 -0500 Subject: [PATCH 6/9] Removed Script and Style Dependencies --- .../templates/debug_toolbar/base.html | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) mode change 100644 => 100755 debug_toolbar/templates/debug_toolbar/base.html diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html old mode 100644 new mode 100755 index a790bd107..a9eef8f94 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,9 +1,35 @@ {% load i18n %} - - + + +