Skip to main content

Snippets embedder for Wagtail RichTextField.

Project description

wagtailembedder
==================

![Wagtailembedder scnreenshot](http://i.imgur.com/qDPKz7r.png)

Snippets embedder for Wagtail RichTextField.

# Quickstart

``` $ pip install wagtailembedder```

add wagtailembedder to your settings.py in the INSTALLED_APPS section:

```
...
'modelcluster',
'wagtailembedder',
'core',
...
```

For each of your models registered as a wagtail.wagtailsnippets create an html file to render the template inside a RichText field.
Example: if we have a ```SocialMediaLink``` snippet in our ```core``` app we need to create a template in ```core/templates/snippets/social_media_link.html```. The variable containing the snippet instance in the template is ```snippet```.

If no template is defined then an exception will be raised in the frontend when rendering a RichTextField with the embedded snippet in it. Make sure you write some templates for your snippets before start to embedding them.

Templates names will match snippets models names replacing capital letters with underscores, Wagtail style.

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

wagtailembedder-0.1.4.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

wagtailembedder-0.1.4-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wagtailembedder-0.1.4.tar.gz.

File metadata

File hashes

Hashes for wagtailembedder-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5f9bb8a202ea112677079dbef14c49dfbef836b82d3b9723c96cd2ae68e37a96
MD5 6c273ca0e9de850197ea6542ede4dac0
BLAKE2b-256 8cd48adec0285907b38076811b9bcea6af55561f264aa01ff2a671f4081001f3

See more details on using hashes here.

Provenance

File details

Details for the file wagtailembedder-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for wagtailembedder-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9b0524ec3146ae283f934297d6cfee5b7393160bda6460a15e7c31bd82de0b85
MD5 7b56ca7726e02be1e85bbc4e04ba95fd
BLAKE2b-256 2782d217467f909d6e79c1f1437124199d9497fe5d6758164d1435768ecf1785

See more details on using hashes here.

Provenance

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