Registry / content / django-quill-editor

django-quill-editor

JSON →
library0.1.42pypypi✓ verified 85d ago

Integrates the Quill rich text editor into Django projects. Current version 0.1.42, release cadence is irregular. Provides a model field and form field for Quill content.

pip install django-quill-editor
INSTALL
IMPORT
SIG · DJANGO-QUILL-EDITO
D
django-quill-editor
contentpythonv0.1.42
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QuillField
from django_quill.fields import QuillField
from quill.fields import QuillField
Incorrect module name 'quill'.
QuillFormField
from django_quill.forms import QuillFormField
from quill.forms import QuillFormField
Incorrect module name 'quill'.

Add 'django_quill' to INSTALLED_APPS, define a model with QuillField, and access HTML via .html attribute.

# settings.py INSTALLED_APPS = [ ... 'django_quill', ] # models.py from django.db import models from django_quill.fields import QuillField class Article(models.Model): content = QuillField() # views.py from .models import Article article = Article.objects.create(content='<p>Hello world</p>') print(article.content.html)
Debug
Known issues
breakingIn version 0.1.29, QuillField was changed from storing JSON to storing HTML. Existing data may need migration.
fix
Migrate old JSON data to HTML format using a data migration.
affects: <0.1.29
deprecatedThe 'QuillEditor' widget is deprecated in favor of 'QuillWidget'.
fix
Use 'QuillWidget' from django_quill.widgets instead.
affects: >=0.1.35
gotchaQuillField stores HTML string, not Quill Delta JSON. Accessing .delta will raise AttributeError.
fix
Use .html attribute to get HTML or .quill_data to get the raw stored string.
affects: >=0.1.29
gotchaStatic files may not be served automatically in production. You need to run collectstatic.
fix
Run 'python manage.py collectstatic' and configure static file serving.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'QuillField' from 'quill'
Incorrect import path. The module is 'django_quill' not 'quill'.
fix
Use 'from django_quill.fields import QuillField'.
AttributeError: 'QuillField' object has no attribute 'delta'
The field stores HTML, not Delta JSON. The 'delta' attribute was removed after version 0.1.29.
fix
Use '.html' to get HTML content.
django.core.exceptions.ImproperlyConfigured: 'django_quill' is not a registered namespace
Missing 'django_quill' in INSTALLED_APPS.
fix
Add 'django_quill' to INSTALLED_APPS.
Upgrade
Version history
0.1.42latest on PyPI · released Sep 20, 2024
Audit
Dependencies
DjangorequiredRequired for integration.
QuillrequiredJS library, included via static files.
Agent activity
6 hits · last 30 days
node
6
Resources
django-quill-editor — pip install django-quill-editor · libregistry