This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for groups & static blocks.
- Loading branch information
1 parent
a544ab1
commit e364e71
Showing
6 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from wagtail.core.blocks import StaticBlock, Block | ||
|
||
from ..constants import FIELD_NAME_TEMPLATE | ||
|
||
|
||
class NewStaticBlock(StaticBlock): | ||
def get_definition(self): | ||
definition = Block.get_definition(self) | ||
definition.update( | ||
isStatic=True, | ||
html=self.render_form(self.get_default(), | ||
prefix=FIELD_NAME_TEMPLATE), | ||
) | ||
return definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
wagtail_react_streamfield/static/js/wagtail-react-streamfield.js
Large diffs are not rendered by default.
Oops, something went wrong.