add markdown field
This commit is contained in:
parent
40da878973
commit
cbdf68a583
2 changed files with 6 additions and 3 deletions
|
@ -2,6 +2,7 @@ from wagtail.wagtailcore.fields import StreamField
|
||||||
from wagtail.wagtailcore import blocks
|
from wagtail.wagtailcore import blocks
|
||||||
from wagtail.wagtailimages.blocks import ImageChooserBlock
|
from wagtail.wagtailimages.blocks import ImageChooserBlock
|
||||||
from wagtail.wagtaildocs.blocks import DocumentChooserBlock
|
from wagtail.wagtaildocs.blocks import DocumentChooserBlock
|
||||||
|
from wagtailmarkdown.blocks import MarkdownBlock
|
||||||
|
|
||||||
|
|
||||||
def build_header_fields():
|
def build_header_fields():
|
||||||
|
@ -14,13 +15,14 @@ def build_fixed_fields():
|
||||||
return [
|
return [
|
||||||
('ansi', blocks.TextBlock(template="blocks/ansi.html")),
|
('ansi', blocks.TextBlock(template="blocks/ansi.html")),
|
||||||
('document', DocumentChooserBlock()),
|
('document', DocumentChooserBlock()),
|
||||||
('gist', blocks.CharBlock(template="blocks/gist.html")),
|
('gist', blocks.CharBlock(icon="code", template="blocks/gist.html")),
|
||||||
('image', ImageChooserBlock()),
|
('image', ImageChooserBlock()),
|
||||||
('ol', blocks.ListBlock(blocks.CharBlock(label="List Item"), label="Ordered List", template='blocks/ordered-list.html')),
|
('markdown', MarkdownBlock()),
|
||||||
|
('ol', blocks.ListBlock(blocks.CharBlock(label="List Item"), icon="list-ol", label="Ordered List", template='blocks/ordered-list.html')),
|
||||||
('paragraph', blocks.RichTextBlock()),
|
('paragraph', blocks.RichTextBlock()),
|
||||||
('raw_html', blocks.RawHTMLBlock(label="Raw HTML")),
|
('raw_html', blocks.RawHTMLBlock(label="Raw HTML")),
|
||||||
('secret', blocks.RichTextBlock(icon="password", template='blocks/secret.html')),
|
('secret', blocks.RichTextBlock(icon="password", template='blocks/secret.html')),
|
||||||
('ul', blocks.ListBlock(blocks.CharBlock(label="List Item"), label="Unordered List")),
|
('ul', blocks.ListBlock(blocks.CharBlock(label="List Item"), icon="list-ul", label="Unordered List")),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,6 @@ psycopg2==2.6.2
|
||||||
pygments-style-github==0.4
|
pygments-style-github==0.4
|
||||||
safety==0.5.1
|
safety==0.5.1
|
||||||
wagtail>=1.7,<1.8
|
wagtail>=1.7,<1.8
|
||||||
|
git+https://github.com/RealOrangeOne/wagtail-markdown
|
||||||
waitress==1.0.1
|
waitress==1.0.1
|
||||||
whitenoise==3.2.2
|
whitenoise==3.2.2
|
||||||
|
|
Reference in a new issue