{ "info": { "author": "Tim Allen", "author_email": "tallen@wharton.upenn.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Wagtail Content Stream\n\nAn abstract Django model with a Wagtail StreamField named `body` with multiple blocks I use on a regular basis. It's opinioned: very little HTML is allowed in the text block, forcing authors to create structured data. The following blocks are included in the StreamBlock, `ContentStreamBlock`:\n\n* Heading\n* Paragraph\n* Captioned Image\n* Embed\n* Table\n* Code Block\n\nA secondary StreamBlock, `ContentStreamBlockWithRawCode`, also provides an additional block for injecting HTML, JS, and CSS code. Use with care, as this can really blow up your markup and is a potential code injection point!\n\nThree pages types are provided out-of-the-box.\n\n## Example Usage\n\nYou will need to add `wagtailcodeblock` to your `INSTALLED_APPS` Django setting.\n\n#### Basic Usage: a Title Field and Content Stream\n\nFirst, create a page type in your `models.py`:\n\n```python\nfrom wagtailcontentstream.models import ContentStreamPage, SectionContentStreamPage, ContentStreamPageWithRawCode\n\nclass StandardPage(ContentStreamPage):\n pass\n\nclass SectionStandardPage(SectionContentStreamPage):\n pass\n\nclass StandardPageWithRawCode(ContentStreamPageWithRawCode):\n pass\n```\n\nThen in your template:\n\n```django\n{% load wagtailcore_tags %}\n\n