Skip to main content

A Wagtail richdocument content type built with wagtail streamfield.

Project description

This is a wagtail app to be applied on wagtail generic docs. It adds the following streamfield blocks:

  • doc_byline

  • body_text

  • quote

  • bustout

  • code_chunk

  • math_formula

  • table

  • media_embed


Quick Start

install from pypy:

pip install wagtail-utphy-richdocument

add “utphy_richdocument” and “wagtail.contrib.table_block” to your INSTALLED_APPS setting:

  • In your own app create a new model which subclasses the StreamFieldDoc model.

from utphy_richdocument.models import StreamFieldDoc
from wagtail.wagtailadmin.edit_handlers import StreamFieldPanel

class YourModel(StreamFieldDoc):
    template = 'path_to_your_template.html'

    content_panels = Page.content_panels + [
        # your_model_fields
  • In your template, make sure you have the following snippet:

{% for block in self.body %}
{% endfor %}

Finally run:

python collectstatic
python makemigrations
python migrate

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-utphy-richdocument-0.7.5.tar.gz (23.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page