Skip to main content

A Collection of awesome Wagtail CMS stream-field blocks and Charts

Project description

wagtail_blocks wagtail

PyPI Build Documentation Status PyPI - License

A Collection of awesome Wagtail CMS stream-field blocks and Charts.

Check out Awesome Wagtail for more awesome packages and resources from the Wagtail community.

Note

This project is still early on in its development lifecycle. It is possible for breaking changes to occur between versions until reaching a stable 1.0, however we will clearly note any breaking changes between releases if applicable. Feedback and pull requests are welcome.

Quickstart

You must have your Wagtail project up and running:

pip install wagtail_blocks

Add the following enteries to your settings.py in the INSTALLED_APPS section:

'wagtailfontawesome',
'wagtail_blocks',

Sample Usage

from wagtail_blocks.blocks import HeaderBlock, ListBlock, ImageTextOverlayBlock, CroppedImagesWithTextBlock, \
    ListWithImagesBlock, ThumbnailGalleryBlock, ChartBlock, MapBlock, ImageSliderBlock

class HomePage(Page):
    body = StreamField([
        ('header', HeaderBlock()),
        ('list', ListBlock()),
        ('image_text_overlay', ImageTextOverlayBlock()),
        ('cropped_images_with_text', CroppedImagesWithTextBlock()),
        ('list_with_images', ListWithImagesBlock()),
        ('thumbnail_gallery', ThumbnailGalleryBlock()),
        ('chart', ChartBlock()),
        ('map', MapBlock()),
        ('image_slider', ImageSliderBlock()),
    ], blank=True)

    content_panels = Page.content_panels + [
        StreamFieldPanel("body", classname="Full"),
    ]

For HomePage template, blocks should be rendered with IDs to function properly

{% for block in page.body %}
    {% include_block block with block_id=block.id %}
{% endfor %}

Available Blocks

Check Showcase for Standard Blocks or Charts or Maps streamfield

  • Header (H1, H2, H3, H4, H5, H6)
  • List (Unordered List)
  • Image with Text Overlay
  • Cropped Images with Text
  • List with Images and Links
  • Thumbnail Gallery
  • Image Slider
  • Chart (Bar - Pie - Line - Area - Radar)
  • Map (Marker with rich text description)

Supported Versions

  • Python 3.6 and higher
  • Wagtail 2 and higher
  • Bootstrap 4

Project details


Download files

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

Files for wagtail-blocks, version 0.7.2
Filename, size File type Python version Upload date Hashes
Filename, size wagtail_blocks-0.7.2.tar.gz (121.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page