app/soc/views/site/user/profile.py
changeset 268 af1d7f48b361
parent 267 0c008a43443b
child 269 0f1acc4c3e1e
equal deleted inserted replaced
267:0c008a43443b 268:af1d7f48b361
    30 
    30 
    31 from soc.logic import validate
    31 from soc.logic import validate
    32 from soc.logic import out_of_band
    32 from soc.logic import out_of_band
    33 from soc.logic.site import id_user
    33 from soc.logic.site import id_user
    34 from soc.views import simple
    34 from soc.views import simple
       
    35 from soc.views import helper
       
    36 import soc.views.helper.lists
    35 from soc.views import helpers
    37 from soc.views import helpers
    36 import soc.views.helpers.list
       
    37 import soc.views.helpers.request
    38 import soc.views.helpers.request
    38 from soc.views.helpers import forms_helpers
    39 from soc.views.helpers import forms_helpers
    39 from soc.views.helpers import response_helpers
    40 from soc.views.helpers import response_helpers
    40 from soc.views.user import profile
    41 from soc.views.user import profile
    41 
    42 
   128 
   129 
   129         if user:
   130         if user:
   130           lookup_message = ugettext_lazy('User found by email.')
   131           lookup_message = ugettext_lazy('User found by email.')
   131         else:
   132         else:
   132           email_error = ugettext_lazy('User with that email not found.')
   133           email_error = ugettext_lazy('User with that email not found.')
   133           range_width = helpers.list.getPreferredListPagination()
   134           range_width = helper.lists.getPreferredListPagination()
   134           nearest_user_range_start = id_user.findNearestUsersOffset(
   135           nearest_user_range_start = id_user.findNearestUsersOffset(
   135               range_width, id=form_id)
   136               range_width, id=form_id)
   136             
   137             
   137           if nearest_user_range_start is not None:            
   138           if nearest_user_range_start is not None:            
   138             context['lookup_link'] = './list?offset=%s&limit=%s' % (
   139             context['lookup_link'] = './list?offset=%s&limit=%s' % (
   149             lookup_message = ugettext_lazy('User found by link name.')
   150             lookup_message = ugettext_lazy('User found by link name.')
   150             email_error = None  # clear previous error, since User was found
   151             email_error = None  # clear previous error, since User was found
   151           else:
   152           else:
   152             context['linkname_error'] = ugettext_lazy(
   153             context['linkname_error'] = ugettext_lazy(
   153                 'User with that link name not found.')
   154                 'User with that link name not found.')
   154             range_width = helpers.list.getPreferredListPagination()
   155             range_width = helper.lists.getPreferredListPagination()
   155             nearest_user_range_start = id_user.findNearestUsersOffset(
   156             nearest_user_range_start = id_user.findNearestUsersOffset(
   156                 range_width, link_name=linkname)
   157                 range_width, link_name=linkname)
   157             
   158             
   158             if nearest_user_range_start is not None:
   159             if nearest_user_range_start is not None:
   159               context['lookup_link'] = './list?offset=%s&limit=%s' % (
   160               context['lookup_link'] = './list?offset=%s&limit=%s' % (