1
Fork 0

add markdown field

This commit is contained in:
Jake Howard 2016-12-05 14:23:11 +00:00
parent 40da878973
commit cbdf68a583
2 changed files with 6 additions and 3 deletions

View file

@ -2,6 +2,7 @@ from wagtail.wagtailcore.fields import StreamField
from wagtail.wagtailcore import blocks
from wagtail.wagtailimages.blocks import ImageChooserBlock
from wagtail.wagtaildocs.blocks import DocumentChooserBlock
from wagtailmarkdown.blocks import MarkdownBlock
def build_header_fields():
@ -14,13 +15,14 @@ def build_fixed_fields():
return [
('ansi', blocks.TextBlock(template="blocks/ansi.html")),
('document', DocumentChooserBlock()),
('gist', blocks.CharBlock(template="blocks/gist.html")),
('gist', blocks.CharBlock(icon="code", template="blocks/gist.html")),
('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()),
('raw_html', blocks.RawHTMLBlock(label="Raw 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")),
]

View file

@ -8,5 +8,6 @@ psycopg2==2.6.2
pygments-style-github==0.4
safety==0.5.1
wagtail>=1.7,<1.8
git+https://github.com/RealOrangeOne/wagtail-markdown
waitress==1.0.1
whitenoise==3.2.2