Skip to content

Instantly share code, notes, and snippets.

@benspaulding
Created June 2, 2009 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benspaulding/122494 to your computer and use it in GitHub Desktop.
Save benspaulding/122494 to your computer and use it in GitHub Desktop.
# Middlware munging in staging settings.py
REMOVED_MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
ORIGINAL_MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES
MIDDLEWARE_CLASSES = []
for mwc in ORIGINAL_MIDDLEWARE_CLASSES:
if not mwc in REMOVED_MIDDLEWARE_CLASSES:
MIDDLEWARE_CLASSES.append(mwc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment