django-kindeditor
This repo is to make it easy to use KindEditor as a RichTextEditor when using django.
You can visit this site to see the editor result: http://kindeditor.org/
Requires
- Django 2.0+
- Python 3.6+
Use
- Install
pip install django-kindeditor
- Add
kindeditorandrest_frameworkto INSTALL_APPS in settings
INSTALLED_APPS = [
...
'kindeditor',
'rest_framework',
]
Example
# models.py
from kindeditor import RichTextField
class Article(models.Model):
title = models.CharField(max_length=80)
content = RichTextField()
# settings.py
KINDEDITOR_UPLOAD_PERMISSION = 'admin'
# admin.py
from django.contrib import admin
from kindeditor import EditorAdmin
from .models import Article
admin.site.register(Article, EditorAdmin)
Demo
- clone the repo to local
git clone https://github.com/waketzheng/django-kindeditor
- create a virtual environment and install required packages
pipenv install --dev
- activate it
pipenv shell
- migrate and compile translation file
./manage.py migrate
./manage.py compilemessages
- runserver
./manage.py runserver
- view the url and you will see the demo at webbrowser
Metadata
Release files for django-kindeditor 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-kindeditor-0.0.4.tar.gz | 515.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_kindeditor-0.0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / django-kindeditor-0.0.4.tar.gz
| Download URL | django-kindeditor-0.0.4.tar.gz |
|---|---|
| Size | 515.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecd762766a77a8bee0601d5fa9a9e77c8a80f911c40658a3352b10accafe4ec6
|
|
BLAKE2b-256 checksum How to use checksums |
dc007a42c6f9f3a647d89d455ad5d4bc639ddaaf0751ec0474c44ac1361cbd84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / django_kindeditor-0.0.4-py2.py3-none-any.whl
| Download URL | django_kindeditor-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 590.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
417beeca771c92781f0cfac838b9c2dc874b0434eec73102d5cc7b4ce814a05b
|
|
BLAKE2b-256 checksum How to use checksums |
9bb2ddf193cec48769f20111b1cc2b601fc329d3109a9f7c8b90251c5f7ae4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|