Skip to main content

Django admin KindEditor integration.

Project description

django-kindeditor

image image image image image image

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/

Chinese[中文版]

Requires

  • Django 2.0+
  • Python 3.6+

Use

  • Install
pip install django-kindeditor
  • Add kindeditor and rest_framework to 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

  1. clone the repo to local
git clone https://github.com/waketzheng/django-kindeditor
  1. create a virtual environment and install required packages
pipenv install --dev
  1. activate it
pipenv shell
  1. migrate and compile translation file
./manage.py migrate
./manage.py compilemessages
  1. runserver
./manage.py runserver
  1. view the url and you will see the demo at webbrowser

http://127.0.0.1:8000

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-kindeditor-0.0.4.tar.gz (515.8 kB view hashes)

Uploaded Source

Built Distribution

django_kindeditor-0.0.4-py2.py3-none-any.whl (590.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page