コード例 #1
0
ファイル: test_files.py プロジェクト: dli7428/reahl
 def __init__(self, view):
     super(FileUploadForm, self).__init__(view, 'test')
     if self.exception:
         self.use_layout(FormLayout())
         self.layout.add_alert_for_domain_exception(self.exception)
     self.add_child(FileUploadInputStub(self, fixture.domain_object.fields.files))
     self.define_event_handler(fixture.domain_object.events.submit)
     self.add_child(Button(self, fixture.domain_object.events.submit))
コード例 #2
0
 def __init__(self, view):
     super(FileUploadForm, self).__init__(view, 'test')
     self.set_attribute('novalidate', 'novalidate')
     self.use_layout(FormLayout())
     self.layout.add_input(
         FileUploadInput(self, fixture.domain_object.fields.files))
     self.define_event_handler(fixture.domain_object.events.submit)
     self.add_child(
         Button(self, fixture.domain_object.events.submit))