예제 #1
0
 def action_on_success(self, resource, context):
     # XXX Set image as public
     form = Table_AddRecord._get_form(self, resource, context)
     path = form['name']
     img_resource = resource.get_resource(str(path))
     img_resource.set_property('state', 'public')
     return context.come_back(MSG(u'New record added.'))
예제 #2
0
파일: images_views.py 프로젝트: hforge/shop
 def action_on_success(self, resource, context):
     # XXX Set image as public
     form = Table_AddRecord._get_form(self, resource, context)
     path = form['name']
     img_resource = resource.get_resource(str(path))
     img_resource.set_property('state', 'public')
     return context.come_back(MSG(u'New record added.'))
예제 #3
0
 def _get_form(self, resource, context):
     form = Table_AddRecord._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
예제 #4
0
파일: images_views.py 프로젝트: hforge/shop
 def _get_form(self, resource, context):
     form = Table_AddRecord._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