Wagtail SVG
Project description
SVG for Wagtail with :
Svg : Model
SvgChooserPanel : ChooserPanel for ForeignKey
SvgChooserBlock : ChooserBlock for StreamField
Can be used like this :
from wagtailsvg.models import Svg from wagtailsvg.blocks import SvgChooserBlock from wagtailsvg.edit_handlers import SvgChooserPanel class TestPage(Page): logo = models.ForeignKey( Svg, related_name='+', null=True, blank=True, on_delete=models.SET_NULL ) body = StreamField([ ('svg', SvgChooserBlock()), ], blank=True) content_panels = Page.content_panels + [ SvgChooserPanel('logo'), StreamFieldPanel('body'), ]
Setup
Install with pip :
pip install wagtailsvg
Add wagtailsvg to django apps installed :
INSTALLED_APPS = [ ... 'wagtailsvg', ]
Development env
git clone git@github.com:Aleksi44/wagtailsvg.git pip install -r requirements.txt python manage.py migrate python manage.py init python manage.py runserver 0.0.0.0:4243
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wagtailsvg-0.0.2.tar.gz
(23.5 kB
view hashes)
Built Distribution
wagtailsvg-0.0.2-py3-none-any.whl
(32.6 kB
view hashes)
Close
Hashes for wagtailsvg-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04143afd03065dca8fe610d01883ff417ca2b1ae2556aecf9c33d47c23a3b8ff |
|
MD5 | 8cd9abb7cb4b0a89797c5b2ef4c54a67 |
|
BLAKE2b-256 | c38585fdf071fa5a42b9d4b7dd6ac581634d2cb72bfe14f777bd15aa262436e0 |