separate copyrighted middleware from my additions

This commit is contained in:
Dusty Phillips 2008-10-11 19:52:51 -04:00
parent 7dedeeafd5
commit 5acf6c46f2
2 changed files with 2 additions and 16 deletions

View File

@ -55,6 +55,8 @@ def process_request(self, request):
user_holder = threading.local()
user_holder.user = None
# END REQUIRE LOGIN MIDDLEWARE
class AutoUserMiddleware(object):
'''Saves the current user so it can be retrieved by the admin'''
def process_request(self, request):

View File

@ -1,18 +1,2 @@
from django.conf import settings
from django.core.cache import cache
from django.shortcuts import render_to_response
from django.template import RequestContext
def prune_cache(django_page_url):
if not settings.CACHE:
return
cache_prefix = 'views.decorators.cache.cache_page.'
cache_prefix += settings.CACHE_MIDDLEWARE_KEY_PREFIX + '.'
cache_postfix = '.d41d8cd98f00b204e9800998ecf8427e'
cache.delete('%s%s%s' % (cache_prefix,django_page_url,cache_postfix))
#utility to make a pair of django choices
make_choice = lambda l: [(str(m), str(m)) for m in l]
# vim: set ts=4 sw=4 et: