コード例 #1
0
ファイル: addresses_views.py プロジェクト: hforge/shop
 def action_add_or_edit(self, resource, context, record):
     # Is authorized ?
     self.is_allowed_to_edit_record(resource.handler, context)
     # We add current user
     record['user'] = context.user.name
     # Normal action
     Table_EditRecord.action_add_or_edit(self, resource, context, record)
コード例 #2
0
ファイル: addresses_views.py プロジェクト: nicolasderam/shop
 def action_add_or_edit(self, resource, context, record):
     # Is authorized ?
     self.is_allowed_to_edit_record(resource.handler, context)
     # We add current user
     record['user'] = context.user.name
     # Normal action
     Table_EditRecord.action_add_or_edit(self, resource, context, record)
コード例 #3
0
ファイル: models_views.py プロジェクト: nicolasderam/shop
 def get_widgets(self, resource, context):
     return [x for x in Table_EditRecord.get_widgets(self, resource, context) \
                                     if x.name not in self.cant_edit_fields]
コード例 #4
0
ファイル: images_views.py プロジェクト: nicolasderam/shop
 def _get_form(self, resource, context):
     form = Table_EditRecord._get_form(self, resource, context)
     # We check if the image path refer to an Image instance
     path = form['name']
     check_photo(path, resource, 'name')
     return form
コード例 #5
0
ファイル: images_views.py プロジェクト: hforge/shop
 def _get_form(self, resource, context):
     form = Table_EditRecord._get_form(self, resource, context)
     # We check if the image path refer to an Image instance
     path = form['name']
     check_photo(path, resource, 'name')
     return form