Navigation Menu

Skip to content

Commit

Permalink
Added setting for anon caching only, defaulting to true
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas authored and Andreas committed May 3, 2009
1 parent 9f46212 commit 70c7267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions staticgenerator/middleware.py
Expand Up @@ -18,6 +18,8 @@ class StaticGeneratorMiddleware(object):
gen = StaticGenerator()

def process_response(self, request, response):
if getattr(settings, 'STATIC_GENERATOR_ANON_ONLY', True) == True and request.user.is_authenticated():
return response
if response.status_code == 200:
for url in self.urls:
if url.match(request.path_info):
Expand Down

0 comments on commit 70c7267

Please sign in to comment.