def localsite(request):
 local_site_name = getattr(request, u'_local_site_name', None)
 return {u'local_site_name': local_site_name, u'perms': AllPermsWrapper(request.user, local_site_name)}

def localsite ( request ) : local_site_name = getattr ( request , u'_local_site_name' , None ) return { u'local_site_name' : local_site_name , u'perms' : AllPermsWrapper ( request . user , local_site_name ) }
returns context variables useful to local sites .