mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-04 07:10:25 +00:00
Merge pull request #3445 from cho-leukeleu/patch-2
StreamFieldPanels do not accept classname attribute
This commit is contained in:
commit
c707f6c0b7
1 changed files with 4 additions and 2 deletions
|
|
@ -854,12 +854,14 @@ class BaseStreamFieldPanel(BaseFieldPanel):
|
|||
|
||||
|
||||
class StreamFieldPanel(object):
|
||||
def __init__(self, field_name):
|
||||
def __init__(self, field_name, classname=''):
|
||||
self.field_name = field_name
|
||||
self.classname = classname
|
||||
|
||||
def bind_to_model(self, model):
|
||||
return type(str('_StreamFieldPanel'), (BaseStreamFieldPanel,), {
|
||||
'model': model,
|
||||
'field_name': self.field_name,
|
||||
'block_def': model._meta.get_field(self.field_name).stream_block
|
||||
'block_def': model._meta.get_field(self.field_name).stream_block,
|
||||
'classname': self.classname,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue