Django-debug-toolbar v.0.9.1

Advertisement
Advertisement

jango-debug-toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content.Currently, the following panels have been written and are working: * Django version * Request timer * A list of settings in settings.py * Common HTTP headers * GET/POST/cookie/session variable display * Templates and context used, and their template paths * SQL queries including time to execute and links to EXPLAIN each query * Logging output via Python's built-in logging moduleIf you have ideas for other panels please let us know.Installation1. Add the debug_toolbar directory to your Python path.2. Add the following middleware to your project's settings.py file: 'debug_toolbar.middleware.DebugToolbarMiddleware',Tying into middleware allows each panel to be instantiated on request and rendering to happen on response.The order of MIDDLEWARE_CLASSES is important: the Debug Toolbar middleware must come after any other middleware that encodes the response's content (such as GZipMiddleware). Note: The debug toolbar will only display itself if the mimetype of the response is either text/html or application/xhtml+xml and contains a closing tag.3. Make sure your IP is listed in the INTERNAL_IPS setting. If you are working locally this will be: INTERNAL_IPS = ('127.0.0.1',)Note: This is required because of the built-in requirements of the show_toolbar method. See below for how to define a method to determine your own logic for displaying the toolbar.4. Add debug_toolbar to your INSTALLED_APPS setting so Django can find the template files associated with the Debug Toolbar. Alternatively, add the path to the debug toolbar templates ('path/to/debug_toolbar/templates' to your TEMPLATE_DIRS setting.)ConfigurationThe debug toolbar has two settings that can be set in settings.py:1. Optional: Add a tuple called DEBUG_TOOLBAR_PANELS to your settings.py file that specifies the full Python path to the panel that you want included in the Toolbar. This setting looks very much like the MIDDLEWARE_CLASSES setting. For example: 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.request_vars.RequestVarsDebugPanel', 'debug_toolbar.panels.template.TemplateDebugPanel', 'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.logger.LoggingPanel', ) You can change the ordering of this tuple to customize the order of the panels you want to display, or add/remove panels. If you have custom panels you can include them in this way -- just provide the full Python path to your panel.2. Optional: There are a few configuration options to the debug toolbar that can be placed in a dictionary: * INTERCEPT_REDIRECTS: If set to True (default), the debug toolbar will show an intermediate page upon redirect so you can view any debug information prior to redirecting. This page will provide a link to the redirect destination you can follow when ready. If set to False, redirects will proceed as normal. * SHOW_TOOLBAR_CALLBACK: If not set or set to None, the debug_toolbar middleware will use its built-in show_toolbar method for determining whether the toolbar should show or not. The default checks are that DEBUG must be set to True and the IP of the request must be in INTERNAL_IPS. You can provide your own method for displaying the toolbar which contains your custom logic. This method should return True or False. Example configuration: def custom_show_toolbar(request): return True # Always show toolbar, for example purposes only. DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': False, 'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar, }#md5=d40d7d462172e41bbfdc69f0182bd91b

jango-debug-toolbar is a configurable set of ... A configurable set of panels that display various debug information about the current request/response ...

 
  • Django-debug-toolbar
  • 0.9.1
  • Rob Hudson
  • Linux
  • Freeware
  • 143 Kb
  • 278
  • Free
 
 

Review Django-debug-toolbar

  • captcha
 
 
New Miscellaneous software
  • HttpMaster Express  v.4.5.0HttpMaster is a development and test tool for web applications, with special focus on REST web services, API applications, and websites. Because HttpMaster is universal http test tool it can be used with development of various web application types.
  • HttpMaster Professional  v.4.5.0HttpMaster is a development and test tool for web applications, with special focus on REST web services, API applications, and websites. Because HttpMaster is universal http test tool it can be used with development of various web application types.
  • VisualNEO Web  v.19.4.5Visually design, develop and publish Web and mobile professional Apps. Drag and drop interface. NeoScript, a simplified programming language with wizards. Create your own plugins to integrate any JavaScript library.
  • TechSEO360 for Mac  v.1.0.6Crawler for SEO website audits including content, internal linking and broken references. Can also create all kinds of sitemaps including XML with hreflang, video, image, RSS/ROR, text, custom HTML/CSS/Javascript and DOT for visualization graphs.
  • CairoForPHP  v.0.9.0Yet Another Python Web Framework ...
  • Deliverance  v.0.6Deliverance is a tool to theme HTML,.