A filerobot image editing widget for Wagtail Image fields.
Project description
filerobot
A wagtail widget to add filerobot image editor to your wagtail fields.
Quick start
-
Add 'filerobot' to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ..., 'filerobot', ]
-
Import and use the widget on your model
from django.db import models from wagtail import fields from wagtail.models import Page from wagtail.admin.panels import FieldPanel from filerobot.widgets import FilerobotWidget from filerobot.blocks import FilerobotBlock as FilerobotBlock from filerobot.fields import FilerobotField as FilerobotImageField class HomePage(Page): image = models.ForeignKey( "wagtailimages.Image", null=True, blank=True, on_delete=models.SET_NULL, related_name="+", ) # As an automatic foreign key field! filerobot_image = FilerobotImageField( tabs=[ "Finetune", "Filters", "Adjust", "Watermark", "Annotate", "Resize", ], ) content_panels = [ # As a widget! FieldPanel('image', widget=FilerobotWidget(tabs=[ "Finetune", "Filters", "Adjust", "Watermark", "Annotate", "Resize", ])), FieldPanel("filerobot_image"), *Page.content_panels, FieldPanel('content'), ] content = fields.StreamField([ # As a block! ('filerobot', FilerobotBlock()), ], blank=True, use_json_field=True)
-
Add the URLs to your urls.py
from django.urls import path, include urlpatterns = [ path('filerobot/', include('filerobot.urls')), ]
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
wagtail-filerobot-1.1.3.tar.gz
(325.0 kB
view hashes)