@simple_decorator
def check_login_required(view_func):
 def _check(*args, **kwargs):
  siteconfig = SiteConfiguration.objects.get_current()
  if siteconfig.get(u'auth_require_sitewide_login'):
   return login_required(view_func)(*args, **kwargs)
  else:
   return view_func(*args, **kwargs)
 return _check

@ simple_decorator def check_login_required ( view_func ) : def _check ( * args , ** kwargs ) : siteconfig = SiteConfiguration . objects . get_current ( ) if siteconfig . get ( u'auth_require_sitewide_login' ) : return login_required ( view_func ) ( * args , ** kwargs ) else : return view_func ( * args , ** kwargs ) return _check
check whether the user needs to log in .