You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#coding: utf-8
|
|
from django.http import HttpResponseRedirect
|
|
|
|
class CheckUserSiteMiddleware(object):
|
|
|
|
def process_request(self, request):
|
|
if (request.path.startswith('/admin/') and
|
|
not request.user.is_authenticated()):
|
|
|
|
return HttpResponseRedirect('/')
|