from django.shortcuts import redirect
def loginrequired(view_func):
def wrapper(request, *args, **kwargs):
if request.session.has_key('islogin'):
return view_func(request, *args, **kwargs)
else:
return redirect('/user/login/')
return wrapper
from django.shortcuts import redirect
def loginrequired(view_func):
def wrapper(request, *args, **kwargs):
if request.session.has_key('islogin'):
return view_func(request, *args, **kwargs)
else:
return redirect('/user/login/')
return wrapper