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 """ |