Integrate Quill editor with Django project.
Project description
django-quill-editor
django-quill-editor makes Quill.js easy to use on Django Forms and admin sites
- No configuration required for static files!
- The entire code for inserting WYSIWYG editor is less than 30 lines
- It can be used in both admin and Django views
Documentation
The full document is in https://django-quill-editor.readthedocs.io/, including everything about how to use the Form or ModelForm, and where you can add custom settings.
Please refer to the QuickStart section below for simple usage.
QuickStart
Setup
-
Install
django-quill-editor
to your Python environmentRequires Python 3.7 or higher and Django 3.1 or higher.
pip install django-quill-editor
-
Add
django_quill
toINSTALLED_APPS
insettings.py
# settings.py INSTALLED_APPS = [ 'django.contrib.admin', ... 'django_quill', ]
Making Model
Add QuillField
to the Model class you want to use.
- App containing models.py must be added to INSTALLED_APPS
- After adding the app, you need to run makemigrations and migrate to create the DB table.
# models.py
from django.db import models
from django_quill.fields import QuillField
class QuillPost(models.Model):
content = QuillField()
Using in admin
Just register the Model in admin.py of the app.
from django.contrib import admin
from .models import QuillPost
@admin.register(QuillPost)
class QuillPostAdmin(admin.ModelAdmin):
pass
docker-compose up (in local)
docker-compose -f docker-compose-local.yml up --build --force-recreate --remove-orphans
Contributing
As an open source project, we welcome contributions. The code lives on GitHub
Distribution tips (for owners)
Installation
# black
brew install black
# pre-commit
brew install pre-commit
pre-commit install
PyPI Release
poetry install # Install PyPI distribution packages
python deploy.py
Sphinx docs
brew install sphinx-doc # macOS
Local
cd docs
make html
# ...
# The HTML pages are in _build/html.
cd _build/html
python -m http.server 3001
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
Built Distribution
Hashes for django-quill-editor-0.1.26.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69c6cd9fa1e980d0087d35640912f5d0c8fa84b47dfac73ceffc5aa0968ec76b |
|
MD5 | 5e4d66fe45348ab5a01fead9649a937a |
|
BLAKE2b-256 | 9079422ccbaa50afdfc01a918c927c4f22fb3c6d4f84cb789b30189dc14714bf |
Hashes for django_quill_editor-0.1.26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce7cedfa4ca05c30d16d79327e9c54c3da451d177fe4c8231c1480f48bd531a7 |
|
MD5 | c554544244ae6fd3294d73c42be503eb |
|
BLAKE2b-256 | afba751ca3c7fce6130e3a38e99bf47fc3197201c313b090f315ec973f28941e |