Skip to main content

Social Networks settings for wagtail sites.

Project description

Community-Project

PyPI - Supported versions PyPI - Package version PyPI - Downloads PyPI - MIT License

Codacy Badge Codacy Badge

Wagtail SB Struct Block

Wagtail package to render render struct block with a tabbed interface to distinguish between content fields an settings fields in struct blocks.

Requirements

  • Python 3.8.1 or higher
  • Wagtail 3.0 or higher
  • Django 3.2 or higher

Install

pip install wagtail-sb-structblock

Usage

Add wagtail_sb_structblock to your INSTALLED_APPS settings

INSTALLED_APPS = [
  # ...
  "wagtail_sb_structblock",
  # ...
]

In your struct blocks must inherith from StructBlock and you must specify the settings_fields ub your Meta class.

from wagtail.blocks import StructBlock
from wagtail_sb_structblock.blocks import StructBlock

class EnhancedHTMLBlock(StructBlock):
    text = CharBlock()

    html_attrs = CharBlock()

    class Meta:
        settings_fields = [
            "html_attrs",
        ]

Include it in your stream file and your model so you can use a tabed interface for your struct block.

content tab

settings tab

Docs

Changelog

All changes to versions of this library are listed in the change history.

Development

Check out our contribution guide.

Contributors

See the list of contributors here.

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_sb_structblock-0.2.0.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

wagtail_sb_structblock-0.2.0-py3-none-any.whl (11.5 kB view hashes)

Uploaded Python 3

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