mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-05 22:14:45 +00:00
Add a get_panel definition on StreamField to ensure it uses StreamFieldPanel.
This will probably only get used in very obscure cases (streamfields inside inline panels that don't have an explicit panel def) but it can't hurt to add it...
This commit is contained in:
parent
3d314b80ae
commit
1df3b6f7b9
1 changed files with 4 additions and 0 deletions
|
|
@ -54,6 +54,10 @@ class StreamField(with_metaclass(models.SubfieldBase, models.Field)):
|
|||
def get_internal_type(self):
|
||||
return 'TextField'
|
||||
|
||||
def get_panel(self):
|
||||
from wagtail.wagtailadmin.edit_handlers import StreamFieldPanel
|
||||
return StreamFieldPanel
|
||||
|
||||
def deconstruct(self):
|
||||
name, path, _, kwargs = super(StreamField, self).deconstruct()
|
||||
block_types = self.stream_block.child_blocks.items()
|
||||
|
|
|
|||
Loading…
Reference in a new issue