diff --git a/opentech/public/funds/models.py b/opentech/public/funds/models.py index ae9acb542881e9d31b26bbeba734fe00ecb0067d..0b1f212eb1abad8bba7634a1aa12888d1836db39 100644 --- a/opentech/public/funds/models.py +++ b/opentech/public/funds/models.py @@ -6,6 +6,8 @@ from django.db import models from django.utils.deconstruct import deconstructible from modelcluster.fields import ParentalKey +from pagedown.widgets import PagedownWidget + from wagtail.admin.edit_handlers import ( FieldPanel, FieldRowPanel, @@ -91,7 +93,7 @@ class FundIndex(BasePage): introduction = models.TextField(blank=True) content_panels = BasePage.content_panels + [ - FieldPanel('introduction') + FieldPanel('introduction', widget=PagedownWidget()) ] def get_context(self, request, *args, **kwargs): @@ -216,7 +218,7 @@ class LabIndex(BasePage): introduction = models.TextField(blank=True) content_panels = BasePage.content_panels + [ - FieldPanel('introduction') + FieldPanel('introduction', widget=PagedownWidget()) ] def get_context(self, request, *args, **kwargs): diff --git a/opentech/public/news/models.py b/opentech/public/news/models.py index c5a9f5d3f31d0c95858f527f1d941e426068d9b2..d13c4c2c5b2c7e8bf2c746acea563b91bea80efb 100644 --- a/opentech/public/news/models.py +++ b/opentech/public/news/models.py @@ -4,6 +4,7 @@ from django.conf import settings from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from modelcluster.fields import ParentalKey +from pagedown.widgets import PagedownWidget from wagtail.core.models import Orderable from wagtail.core.fields import StreamField @@ -130,7 +131,7 @@ class NewsIndex(BasePage): introduction = models.TextField(blank=True) content_panels = BasePage.content_panels + [ - FieldPanel('introduction') + FieldPanel('introduction', widget=PagedownWidget()) ] def get_context(self, request, *args, **kwargs): diff --git a/opentech/public/people/models.py b/opentech/public/people/models.py index 4fbe6d31eb8e05d4ec27a69bb178746023bc39a5..c8efecf66256cf78170aec2d125cc548bb69a160 100644 --- a/opentech/public/people/models.py +++ b/opentech/public/people/models.py @@ -4,6 +4,7 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.conf import settings from modelcluster.fields import ParentalKey +from pagedown.widgets import PagedownWidget from wagtail.core.models import Orderable, PageManager, PageQuerySet from wagtail.core.fields import StreamField @@ -201,7 +202,7 @@ class PersonIndexPage(BasePage): introduction = models.TextField(blank=True) content_panels = BasePage.content_panels + [ - FieldPanel('introduction'), + FieldPanel('introduction', widget=PagedownWidget()), ] search_fields = BasePage.search_fields + [ diff --git a/opentech/public/projects/models.py b/opentech/public/projects/models.py index 70e859544ffb898169470ac33f675e34093331bc..3f4c6e998123a0d53ddf7085dc4d09c97f6e339a 100644 --- a/opentech/public/projects/models.py +++ b/opentech/public/projects/models.py @@ -7,6 +7,8 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.core.validators import URLValidator from modelcluster.fields import ParentalKey +from pagedown.widgets import PagedownWidget + from wagtail.admin.edit_handlers import ( FieldPanel, InlinePanel, @@ -154,7 +156,7 @@ class ProjectIndexPage(BasePage): introduction = models.TextField(blank=True) content_panels = BasePage.content_panels + [ - FieldPanel('introduction'), + FieldPanel('introduction', widget=PagedownWidget()), ] search_fields = BasePage.search_fields + [ diff --git a/opentech/public/standardpages/models.py b/opentech/public/standardpages/models.py index aebb6b274e1ac100fc2e55f7f229489f089ed1b6..75fa8abf5aeab58a6640becb9f638d176e7d2b00 100644 --- a/opentech/public/standardpages/models.py +++ b/opentech/public/standardpages/models.py @@ -3,6 +3,8 @@ from django.conf import settings from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from modelcluster.fields import ParentalKey +from pagedown.widgets import PagedownWidget + from wagtail.admin.edit_handlers import ( FieldPanel, StreamFieldPanel, InlinePanel @@ -42,7 +44,7 @@ class IndexPage(BasePage): introduction = models.TextField(blank=True) content_panels = BasePage.content_panels + [ - FieldPanel('introduction'), + FieldPanel('introduction', widget=PagedownWidget()), ] search_fields = BasePage.search_fields + [