# wagtail_blocks ![wagtail](https://img.shields.io/badge/CMS-Wagtail-green.svg)
[![PyPI](https://img.shields.io/pypi/v/wagtail-blocks.svg)](https://pypi.python.org/pypi/wagtail-blocks) ![Build](https://img.shields.io/pypi/status/wagtail-blocks.svg) [![Documentation Status](https://readthedocs.org/projects/wagtail-blocks/badge/?version=latest)](https://wagtail-blocks.readthedocs.io/en/latest/?badge=latest) ![PyPI - License](https://img.shields.io/pypi/l/wagtail-blocks.svg)
![Downloads](https://static.pepy.tech/badge/wagtail-blocks) ![Downloads Month](https://static.pepy.tech/badge/wagtail-blocks/month) ![Downloads Week](https://static.pepy.tech/badge/wagtail-blocks/week)
A Collection of awesome Wagtail CMS stream-field blocks and Charts.
*Check out [Awesome Wagtail](https://github.com/springload/awesome-wagtail) for more awesome packages and resources from the Wagtail community.*
## Quickstart
You must have your [Wagtail](https://wagtail.io/) project up and running:
```sh
pip install wagtail_blocks
```
Add the following enteries to your `settings.py` in the INSTALLED_APPS section:
```python
'wagtailfontawesomesvg',
'wagtail_blocks',
```
## Sample Usage
```python
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
```html
{% for block in page.body %}
{% include_block block with block_id=block.id %}
{% endfor %}
```
## Available Blocks
Check Showcase for [Standard Blocks](docs/showcase/standard-blocks.md) or [Charts](docs/showcase/chart.md) or [Maps](docs/showcase/map.md)
![streamfield](docs/showcase/screenshots/streamfield-v5.PNG)
- 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
Raw data
{
"_id": null,
"home_page": "https://github.com/ibrahimawadhamid/wagtail_blocks/",
"name": "wagtail-blocks",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "WAGTAIL,STREAMFIELD,WAGTAIL_BLOCKS,WAGTAIL CMS",
"author": "IbrahimAwadHamid",
"author_email": "ibrahim.a.hamid@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7d/6f/230eb648ad448295617b4e73492b820936b51a1f5f5a80366b591c310927/wagtail_blocks-1.0.1.tar.gz",
"platform": null,
"description": "# wagtail_blocks ![wagtail](https://img.shields.io/badge/CMS-Wagtail-green.svg)\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/wagtail-blocks.svg)](https://pypi.python.org/pypi/wagtail-blocks) ![Build](https://img.shields.io/pypi/status/wagtail-blocks.svg) [![Documentation Status](https://readthedocs.org/projects/wagtail-blocks/badge/?version=latest)](https://wagtail-blocks.readthedocs.io/en/latest/?badge=latest) ![PyPI - License](https://img.shields.io/pypi/l/wagtail-blocks.svg)\r\n\r\n![Downloads](https://static.pepy.tech/badge/wagtail-blocks) ![Downloads Month](https://static.pepy.tech/badge/wagtail-blocks/month) ![Downloads Week](https://static.pepy.tech/badge/wagtail-blocks/week)\r\n\r\nA Collection of awesome Wagtail CMS stream-field blocks and Charts.\r\n\r\n*Check out [Awesome Wagtail](https://github.com/springload/awesome-wagtail) for more awesome packages and resources from the Wagtail community.*\r\n\r\n## Quickstart\r\n\r\nYou must have your [Wagtail](https://wagtail.io/) project up and running:\r\n\r\n```sh\r\npip install wagtail_blocks\r\n```\r\n\r\nAdd the following enteries to your `settings.py` in the INSTALLED_APPS section:\r\n\r\n```python\r\n'wagtailfontawesomesvg',\r\n'wagtail_blocks',\r\n```\r\n\r\n## Sample Usage\r\n\r\n```python\r\nfrom wagtail.fields import StreamField\r\nfrom wagtail.admin.panels import FieldPanel\r\n\r\nfrom wagtail_blocks.blocks import (\r\n HeaderBlock,\r\n ListBlock,\r\n ImageTextOverlayBlock,\r\n CroppedImagesWithTextBlock,\r\n ListWithImagesBlock,\r\n ThumbnailGalleryBlock,\r\n ChartBlock,\r\n MapBlock,\r\n ImageSliderBlock,\r\n)\r\n\r\nclass HomePage(Page):\r\n body = StreamField([\r\n ('header', HeaderBlock()),\r\n ('list', ListBlock()),\r\n ('image_text_overlay', ImageTextOverlayBlock()),\r\n ('cropped_images_with_text', CroppedImagesWithTextBlock()),\r\n ('list_with_images', ListWithImagesBlock()),\r\n ('thumbnail_gallery', ThumbnailGalleryBlock()),\r\n ('chart', ChartBlock()),\r\n ('map', MapBlock()),\r\n ('image_slider', ImageSliderBlock()),\r\n ], blank=True, use_json_field=True)\r\n\r\n content_panels = Page.content_panels + [\r\n FieldPanel(\"body\"),\r\n ]\r\n```\r\n\r\n### For HomePage template, blocks should be rendered with IDs to function properly\r\n\r\n```html\r\n{% for block in page.body %}\r\n {% include_block block with block_id=block.id %}\r\n{% endfor %}\r\n```\r\n\r\n## Available Blocks\r\n\r\nCheck Showcase for [Standard Blocks](docs/showcase/standard-blocks.md) or [Charts](docs/showcase/chart.md) or [Maps](docs/showcase/map.md)\r\n\r\n![streamfield](docs/showcase/screenshots/streamfield-v5.PNG)\r\n\r\n- Header (H1, H2, H3, H4, H5, H6)\r\n- List (Unordered List)\r\n- Image with Text Overlay\r\n- Cropped Images with Text\r\n- List with Images and Links\r\n- Thumbnail Gallery\r\n- Image Slider\r\n- Chart (Bar - Pie - Line - Area - Radar)\r\n- Map (Marker with rich text description)\r\n\r\n## Supported Versions\r\n\r\n- Python 3.8 and higher\r\n- Wagtail 4.1 and higher\r\n- Bootstrap 4\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Collection of awesome Wagtail CMS stream-field blocks and Charts",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/ibrahimawadhamid/wagtail_blocks/"
},
"split_keywords": [
"wagtail",
"streamfield",
"wagtail_blocks",
"wagtail cms"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7d6f230eb648ad448295617b4e73492b820936b51a1f5f5a80366b591c310927",
"md5": "a1b4392fb998af4e2b4e11b2534c2c9b",
"sha256": "211b1b5331ce75be3c3bc50a3a797f332ceba60b58f97c8c7e3f8310efe2e141"
},
"downloads": -1,
"filename": "wagtail_blocks-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "a1b4392fb998af4e2b4e11b2534c2c9b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 122438,
"upload_time": "2023-08-07T14:05:32",
"upload_time_iso_8601": "2023-08-07T14:05:32.831872Z",
"url": "https://files.pythonhosted.org/packages/7d/6f/230eb648ad448295617b4e73492b820936b51a1f5f5a80366b591c310927/wagtail_blocks-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-07 14:05:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ibrahimawadhamid",
"github_project": "wagtail_blocks",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "wagtail-blocks"
}