Skip to main content

wagtail_blocks wagtail

PyPI Build Documentation Status PyPI - License

Downloads Downloads Month Downloads Week

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.

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:

'wagtailfontawesomesvg',
'wagtail_blocks',

Sample Usage

from wagtail.fields import StreamField
from wagtail.admin.panels import FieldPanel

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, use_json_field=True)

    content_panels = Page.content_panels + [
        FieldPanel("body"),
    ]

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.8 and higher
  • Wagtail 4.1 and higher
  • Bootstrap 4

Metadata

Release files for wagtail-blocks 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-blocks 1.0.1
File Size Uploaded
wagtail_blocks-1.0.1.tar.gz 122.4 kB Details

Release files / wagtail_blocks-1.0.1.tar.gz

Download URL wagtail_blocks-1.0.1.tar.gz
Size 122.4 kB
Tags Source
SHA-256 checksum
How to use checksums
211b1b5331ce75be3c3bc50a3a797f332ceba60b58f97c8c7e3f8310efe2e141
BLAKE2b-256 checksum
How to use checksums
7d6f230eb648ad448295617b4e73492b820936b51a1f5f5a80366b591c310927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

0.8.1

1 release file

0.7.2

1 release file

0.7.0

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page