예제 #1
0
파일: views.py 프로젝트: wizardlie/wagtail
 def __init__(self, *args, **kwargs):
     super(ExampleForm, self).__init__(*args, **kwargs)
     self.fields['page_chooser'].widget = AdminPageChooser()
     self.fields['image_chooser'].widget = AdminImageChooser()
     self.fields['document_chooser'].widget = AdminDocumentChooser()
     self.fields['date'].widget = AdminDateInput()
     self.fields['time'].widget = AdminTimeInput()
     self.fields['datetime'].widget = AdminDateTimeInput()
 def __init__(self, *args, **kwargs):
     super(ExampleForm, self).__init__(*args, **kwargs)
     self.fields['page_chooser'].widget = AdminPageChooser()
     self.fields['image_chooser'].widget = AdminImageChooser()
     self.fields['document_chooser'].widget = AdminDocumentChooser()
     self.fields['snippet_chooser'].widget = AdminSnippetChooser(Page)
     self.fields['date'].widget = AdminDateInput()
     self.fields['time'].widget = AdminTimeInput()
     self.fields['datetime'].widget = AdminDateTimeInput()
     self.fields['auto_height_text'].widget = AdminAutoHeightTextInput()
     self.fields['default_rich_text'].widget = get_rich_text_editor_widget('default')
예제 #3
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     self.fields["profile_image"].widget = AdminImageChooser()
예제 #4
0
class AuthorEditForm(UserEditForm):
    profile_image = AdminImageChooser()

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.fields["profile_image"].widget = AdminImageChooser()