app/soc/views/site/user/list.py
changeset 272 00cea07656c0
parent 268 af1d7f48b361
child 294 1fdaab4a6ef2
equal deleted inserted replaced
271:01e90bb21b7e 272:00cea07656c0
    24 
    24 
    25 from soc.logic.site import id_user
    25 from soc.logic.site import id_user
    26 from soc.views import simple
    26 from soc.views import simple
    27 from soc.views import helper
    27 from soc.views import helper
    28 import soc.views.helper.lists
    28 import soc.views.helper.lists
    29 from soc.views.helpers import response_helpers
    29 import soc.views.helper.responses
    30 
    30 
    31 import soc.models.user
    31 import soc.models.user
    32 
    32 
    33 
    33 
    34 DEF_SITE_USER_LIST_ALL_TMPL = 'soc/site/user/list/all.html'
    34 DEF_SITE_USER_LIST_ALL_TMPL = 'soc/site/user/list/all.html'
    44   Returns:
    44   Returns:
    45     A subclass of django.http.HttpResponse which either contains the form to
    45     A subclass of django.http.HttpResponse which either contains the form to
    46     be filled out, or a redirect to the correct view in the interface.
    46     be filled out, or a redirect to the correct view in the interface.
    47   """
    47   """
    48   # create default template context for use with any templates
    48   # create default template context for use with any templates
    49   context = response_helpers.getUniversalContext(request)
    49   context = helper.responses.getUniversalContext(request)
    50 
    50 
    51   alt_response = simple.getAltResponseIfNotDeveloper(request,
    51   alt_response = simple.getAltResponseIfNotDeveloper(request,
    52                                                      context=context)
    52                                                      context=context)
    53   if alt_response:
    53   if alt_response:
    54     return alt_response  
    54     return alt_response  
    68                       
    68                       
    69   context = helper.lists.setList(
    69   context = helper.lists.setList(
    70       request, context, users,
    70       request, context, users,
    71       offset=offset, limit=limit, list_templates=list_templates)
    71       offset=offset, limit=limit, list_templates=list_templates)
    72 
    72 
    73   return response_helpers.respond(request, template, context)
    73   return helper.responses.respond(request, template, context)
    74                  
    74