app/soc/views/models/club.py
changeset 1125 c6e8e3573fa2
parent 1115 0a723ff3d27c
child 1127 69a9134c5c7e
equal deleted inserted replaced
1124:d456f50af0d2 1125:c6e8e3573fa2
   222 
   222 
   223     return self.list(request, access_type, 
   223     return self.list(request, access_type, 
   224         page_name, params=list_params, filter=None)
   224         page_name, params=list_params, filter=None)
   225 
   225 
   226 
   226 
   227   def _editGet(self, request, entity, form):
       
   228     """See base.View._editGet().
       
   229     """
       
   230 
       
   231     # fill in the founded_by with data from the entity
       
   232     form.fields['founded_by'].initial = entity.founder.name
       
   233     super(View, self)._editGet(request, entity, form)
       
   234 
       
   235   def _editPost(self, request, entity, fields):
       
   236     """See base.View._editPost().
       
   237     """
       
   238 
       
   239     if not entity:
       
   240       # only if we are creating a new entity we should fill in founder
       
   241       user = user_logic.logic.getForCurrentAccount()
       
   242       fields['founder'] = user
       
   243 
       
   244     super(View, self)._editPost(request, entity, fields)
       
   245 
       
   246 
       
   247   def _getExtraMenuItems(self, role_description, params=None):
   227   def _getExtraMenuItems(self, role_description, params=None):
   248     """Used to create the specific club menu entries.
   228     """Used to create the specific club menu entries.
   249 
   229 
   250     For args see group.View._getExtraMenuItems().
   230     For args see group.View._getExtraMenuItems().
   251     """
   231     """