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
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.24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9deb32ebbd9c598995ac78784e01441a12dfa4d0df7a3bda3675e8db1a592d6c |
|
MD5 | b116a76e66b4132f681cdb2975c5088c |
|
BLAKE2b-256 | 301902ba02f00cf856769fe3f8b145ff57f0ee14d5e75c0ea3e3ab3ee1590ab2 |
Hashes for django_quill_editor-0.1.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e0c8f2a3f786ff0d3bf5b59c3adee006220e94ea3716dc9680146250ba16815 |
|
MD5 | 26e65b90f5d3e81797ff3e8cacc256f8 |
|
BLAKE2b-256 | fa808b755e31bbaebf6b3eda19d451ab5624a2bfaa069982698fe82db1371180 |