Skip to content
Snippets Groups Projects
Commit c5e21658 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Allow customisation of the form class

parent 9d744cb1
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,8 @@ from .forms import BlockFieldWrapper, StreamBaseForm ...@@ -8,6 +8,8 @@ from .forms import BlockFieldWrapper, StreamBaseForm
class AbstractStreamForm(AbstractForm): class AbstractStreamForm(AbstractForm):
page_form_class = StreamBaseForm
class Meta: class Meta:
abstract = True abstract = True
...@@ -27,4 +29,4 @@ class AbstractStreamForm(AbstractForm): ...@@ -27,4 +29,4 @@ class AbstractStreamForm(AbstractForm):
return form_fields return form_fields
def get_form_class(self): def get_form_class(self):
return type('WagtailStreamForm', (StreamBaseForm,), self.get_form_fields()) return type('WagtailStreamForm', (self.page_form_class,), self.get_form_fields())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment