Skip to content

Instantly share code, notes, and snippets.

@montylounge
Created September 24, 2009 20:07
Show Gist options
  • Select an option

  • Save montylounge/193019 to your computer and use it in GitHub Desktop.

Select an option

Save montylounge/193019 to your computer and use it in GitHub Desktop.
from django.shortcuts import render_to_response
from site.settings import DEBUG
class DevMiddleware:
def process_request(self, request):
if DEBUG == False:
if request.user.is_authenticated() == False:
if '/admin' not in request.path:
return render_to_response('splash.html')
else:
return None
else:
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment