Metadata-Version: 2.1
Name: wagtail-sb-structblock
Version: 0.1.0
Summary: Social Networks settings for wagtail sites.
Home-page: https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock
License: MIT
Keywords: Softbutterfly,Django,Migrations
Author: SoftButterfly Development Team
Author-email: dev@softbutterfly.io
Requires-Python: >=3.8.1,<4.0.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django :: 2
Classifier: Framework :: Django :: 3
Classifier: Framework :: Django :: 4
Classifier: Framework :: Wagtail :: 3
Classifier: Framework :: Wagtail :: 4
Classifier: Framework :: Wagtail :: 5
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: Django (<5.0)
Requires-Dist: djangorestframework (<4.0)
Requires-Dist: wagtail (<6.0)
Project-URL: Bug Tracker, https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock/-/issues
Project-URL: Documentation, https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock/-/wikis
Project-URL: Download, https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock/-/archive/v0.1.0/wagtail-sb-structblock-v0.1.0.tar.gz
Project-URL: Repository, https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock
Description-Content-Type: text/markdown

![Community-Project](https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/banners/softbutterfly-open-source--banner--community-project.png)

![PyPI - Supported versions](https://img.shields.io/pypi/pyversions/wagtail-sb-structblock)
![PyPI - Package version](https://img.shields.io/pypi/v/wagtail-sb-structblock)
![PyPI - Downloads](https://img.shields.io/pypi/dm/wagtail-sb-structblock)
![PyPI - MIT License](https://img.shields.io/pypi/l/wagtail-sb-structblock)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/00f3debb1fa94a51894b03ec2273fafa)](https://app.codacy.com/gl/softbutterfly/wagtail-sb-structblock/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Coverage Badge](https://app.codacy.com/project/badge/Coverage/900411c7b5e443f89f85c7978f7504e5)](https://app.codacy.com/gl/softbutterfly/wagtail-sb-structblock/dashboard?utm_source=gl&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

# 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

```bash
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 `SBStructBlock` and you must specify the `settings_fields` ub your `Meta` class.

```python
from wagtail.blocks import StructBlock
from wagtail_sb_structblock.blocks import SBStructBlock

class EnhancedHTMLBlock(SBStructBlock):
    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](./_assets/content_tab.png)

![settings tab](./_assets/settings_tab.png)

## Docs

- [Ejemplos](https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock/-/wikis)
- [Wiki](https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock/-/wikis)

## Changelog

All changes to versions of this library are listed in the [change history](CHANGELOG.md).

## Development

Check out our [contribution guide](CONTRIBUTING.md).

## Contributors

See the list of contributors [here](https://gitlab.com/softbutterfly/open-source/wagtail-sb-structblock/-/graphs/develop).

