Turn off Redirect Intercept on Django Debug Toolbar
November 21, 2009
To turn off the intercepting of each redirect when using the Django Debug Toolbar, add the following to settings.py:
DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': False, }
Adventures in software
November 21, 2009
To turn off the intercepting of each redirect when using the Django Debug Toolbar, add the following to settings.py:
DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': False, }
November 21, 2009
There's some confusion out there about how to set up Pygments with Markdown. The Pygments website suggests that you add a text preprocessor, but it's simpler than that.
This code takes a markdown formatted file and converts it to HTML formatted text including pygments based source code. When formatting code …
November 21, 2009
mod_wsgi is now the recommended method for deploying your django sites. This shows how to set up a django site using mod_wsgi on apache, and have the site auto-reload when the source files change.
Here's what you need:
import os, sys sys.path.append('/path/to/deploy/directory' …
November 21, 2009
Django has build in support for adding comments to model objects.
Add the following field to the model you want to add comments to
enable_comments = models.BooleanField(default=True)
This gives you a way of turning off comments for particular models.
Add the …