kopia lustrzana https://github.com/wagtail/wagtail
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...pull/1034/head
rodzic
3d314b80ae
commit
1df3b6f7b9
|
@ -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()
|
||||
|
|
Ładowanie…
Reference in New Issue