aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/middleware.py
AgeCommit message (Collapse)Author
2011-05-27Change __import__ usage to to be import_module, adjust test reqs to specify ↵David Cramer
>= 1.1,< 1.4, and add note about required Django version
2011-05-26Update TEST check to correct behavior (dont show toolbar under TEST)David Cramer
2011-05-26Correctly handle modules as request.urlconf -- Thanks to Germán M. Bravo ↵David Cramer
(fixes #166)
2011-05-26Merge pull request #165 from eventbrite/request-urlconfDavid Cramer
Accommodate per request URL confs
2011-05-26only load the toolbar if DEBUG, TEST, or INTERNAL_IPS matchDavid Cramer
2011-05-26toolbar should be disabled when settings.TEST is TrueGu Ye
2011-05-25We actually don't need to copy the debug toolbar urlconf.Nathan Yergler
2011-05-25Cache merged URL configurations by their original name.Nathan Yergler
This accomodates sites where middleware may change the urlconf for two different request.
2011-05-10Add support for __traceback_hide__ (tidy_stacktrace now inspects ↵David Cramer
inspect.stack() rather than traceback.extract_stack()) (fixes #160)
2011-05-10Catch non-200 requests (fixes #147)David Cramer
2011-05-09Dont error out if Content-Type is missing (fixes #153)David Cramer
2011-04-22Merge branch 'develop' of git://github.com/robhudson/django-debug-toolbar ↵David Cramer
into robhudson-develop Conflicts: debug_toolbar/media/debug_toolbar/css/toolbar.css debug_toolbar/media/debug_toolbar/css/toolbar.min.css debug_toolbar/media/debug_toolbar/js/toolbar.min.js debug_toolbar/middleware.py debug_toolbar/panels/sql.py debug_toolbar/templates/debug_toolbar/base.html debug_toolbar/templates/debug_toolbar/panels/sql.html
2011-04-20Updated middleware logic to avoid work if content-type isn't right.Rob Hudson
If content-type isn't an HTML type, we no longer process the panels or try to adjust the content length header.
2011-04-18Ensure if we're overriding the urlconf that we're resetting handler404/500David Cramer
2011-04-06Added protection against toolbar injections on gzipped responses.Rob Hudson
2011-03-30Ensure we're always returning a response(?)David Cramer
2011-03-28Instances of the toolbar are now stored at a class level. Added ↵David Cramer
DebugToolbarMiddleware.get_current()
2011-03-28Key on thread.get_ident()David Cramer
2011-03-23Overhaul SQL panel to include better timeline, more compact queries, and ↵David Cramer
better view of stacktrace
2011-01-03Merge branch 'master' of http://github.com/robhudson/django-debug-toolbarDavid Cramer
2010-09-15Fixed issue 6: Redirect page does not set cookie.Rob Hudson
Thanks to ziz for the patch, and offbyone for testing.
2010-08-13Support magical TEST global setting to disable toolbarDavid Cramer
2010-03-03Fixed #68 - Make sure to only bail because of AJAX requests coming from apps ↵Jannis Leidel
other than ddt.
2010-02-26Adjusted Content-Length if we modify the response.Rob Hudson
2010-02-26Fixed typo looking for `setting.DEBUG`Rob Hudson
2010-02-26Also check for HTTP_X_FORWARDED_FOR in case a proxy like Nginx is usedJannis Leidel
Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-02-21Added configurable HTML tag to attach toolbar toDavide Callegari
Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-02-16Don't show the toolbar at all for ajax requestsJannis Leidel
Signed-off-by: Rob Hudson <rob@cogit8.org>
2010-01-18Ensure we honor request.urlconf.Rob Hudson
Previously, the debug toolbar would always bolt on URLs from ROOT_URLCONF, which would break another middleware if it inserts URLs onto request.urlconf.
2009-11-18Fixed leaking middleware for non-200 requests.Rob Hudson
Thanks to Michael Elsdörfer for the report and patch.
2009-11-02detect versions for other installed applicationsAlex Gaynor
2009-11-02Mkae this threadsafeAlex Gaynor
2009-09-15Fix so that the debug toolbar can be enabled/disabled safely on a ↵Augie Fackler
per-request basis.
2009-03-26New configuration option to provide your own 'show_toolbar' method.Rob Hudson
This change allows a custom method to be used in place of the default 'show_toolbar' method on whether the toolbar should be displayed.
2009-03-26Minor cleanup of imports and long lines.Rob Hudson
2009-03-21fixed bug when the string </body> matches more than once in the htmlLoic Bistuer
Signed-off-by: Rob Hudson <rob@cogit8.org>
2009-01-17Fixing AJAX calls to detailed SQL views.Reto Aebersold
Signed-off-by: Rob Hudson <rob@cogit8.org>
2008-12-17Fixes #19 -- Modified the middleware to only install the debug ROOT_URLCONF ↵Russell Keith-Magee
if the debug toolbar is actually displayed.
2008-10-02Merge branch 'urlfix'Rob Hudson
2008-10-02Moving debug toolbar to the bottom of the HTML document and adjusting CSS toRob Hudson
position toolbar at top. Injecting toolbar at the bottom has a few advantages, such as removing the regular expression substitution making it about 5x faster (depending on document size), JS and CSS have a lesser chance of conflicting with others on the page.
2008-10-02A fix for URL patterns getting appended on each request growing indefinitely.Rob Hudson
This may break with other middleware patching urlpatterns, though.
2008-09-30Adding toolbar config to override INTERCEPT_REDIRECTS and, in the future, otherRob Hudson
configurable pieces of the toolbar.
2008-09-30Adding redirect interception to the middleware to be able to view debug infoRob Hudson
before being redirected to a new page. Thanks to [530] in IRC for the idea. Coming soon will be a way to optionally disable this.
2008-09-30Removing unneeded check for toolbar that is taken care of a few lines up.Rob Hudson
2008-09-28Updated to fail nicely when DEBUG=False.Rob Hudson
2008-09-21Refactoring middleware and panels so panels have more explicit middleware-likeRob Hudson
methods to be more clear when panel processing happens.
2008-09-20Patch from Alex Gaynor that fixes jQuery conflicts with Pinax and potentiallyRob Hudson
other projects.
2008-09-20Turn back on if request.is_ajax check but put the monkey patching of URLs in noRob Hudson
matter what so our actual views (for ajax) can be run.
2008-09-20partly done with ajax support and jsRob Hudson
2008-09-15Added a mechanism for monkeypatching in debug views, and also addedJacob Kaplan-Moss
jquery as both a test case and a place to get started making some js improvements. I'm not totally thrilled with this approach -- it feels *very* hackish. The alternative might be to simply require installers to add a line to their ROOT_URLCONF, which wouldn't be *bad*, but I like the "load automatically" part of this thing.