app/soc/views/site/user/profile.py
changeset 274 56e1c1721299
parent 272 00cea07656c0
child 290 2a92b866ed40
equal deleted inserted replaced
273:b97d08ebac0e 274:56e1c1721299
    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
    35 from soc.views import helper
       
    36 import soc.views.helper.forms
    36 import soc.views.helper.lists
    37 import soc.views.helper.lists
    37 import soc.views.helper.requests
    38 import soc.views.helper.requests
    38 import soc.views.helper.responses
    39 import soc.views.helper.responses
    39 from soc.views.helpers import forms_helpers
       
    40 from soc.views.user import profile
    40 from soc.views.user import profile
    41 
    41 
    42 import soc.models.user
    42 import soc.models.user
    43 
    43 
    44 
    44 
    45 class LookupForm(forms_helpers.DbModelForm):
    45 class LookupForm(helper.forms.DbModelForm):
    46   """Django form displayed for a Developer to look up a User.
    46   """Django form displayed for a Developer to look up a User.
    47   
    47   
    48   This form is manually specified, instead of using
    48   This form is manually specified, instead of using
    49     model = soc.models.user.User
    49     model = soc.models.user.User
    50   in the Meta class, because the form behavior is unusual and normally
    50   in the Meta class, because the form behavior is unusual and normally
   182                   'lookup_message': lookup_message})
   182                   'lookup_message': lookup_message})
   183 
   183 
   184   return helper.responses.respond(request, template, context)
   184   return helper.responses.respond(request, template, context)
   185 
   185 
   186 
   186 
   187 class EditForm(forms_helpers.DbModelForm):
   187 class EditForm(helper.forms.DbModelForm):
   188   """Django form displayed when Developer edits a User.
   188   """Django form displayed when Developer edits a User.
   189   
   189   
   190   This form is manually specified, instead of using
   190   This form is manually specified, instead of using
   191     model = soc.models.user.User
   191     model = soc.models.user.User
   192   in the Meta class, because the form behavior is unusual and normally
   192   in the Meta class, because the form behavior is unusual and normally
   332                   'existing_user': user})
   332                   'existing_user': user})
   333 
   333 
   334   return helper.responses.respond(request, template, context)
   334   return helper.responses.respond(request, template, context)
   335 
   335 
   336 
   336 
   337 class CreateForm(forms_helpers.DbModelForm):
   337 class CreateForm(helper.forms.DbModelForm):
   338   """Django form displayed when Developer creates a User.
   338   """Django form displayed when Developer creates a User.
   339 
   339 
   340   This form is manually specified, instead of using
   340   This form is manually specified, instead of using
   341     model = soc.models.user.User
   341     model = soc.models.user.User
   342   in the Meta class, because the form behavior is unusual and normally
   342   in the Meta class, because the form behavior is unusual and normally