django-ckeditor-widget
A CKEditor widget for Django that includes an admin mixin.
How to use
Install using pip:
pip install django-ckeditor-widget
Then use as any other widget:
from django import forms
from ckeditor_widget.widgets import CKEditorWidget
class MyForm(forms.Form):
body = forms.TextField(widget=CKEditorWidget)
https://docs.djangoproject.com/en/1.11/ref/forms/widgets/#specifying-widgets
Make sure that CKEditor is provided in static files as ckeditor/ckeditor.js.
Admin
The app conveniently provides an admin mixin that uses CKEditor for all text fields. Simply inherit from the mixin:
from django.contrib import admin
from ckeditor_widget.admin import CKEditorAdminMixin
from myapp import models
@admin.register(models.Product)
class ProductAdmin(CKEditorAdminMixin, admin.ModelAdmin):
pass
Akternatively, specify formfield_overrides:
formfield_overrides = {
models.TextField: {'widget': CKEditorWidget}
}
Metadata
Release files for django-ckeditor-widget 0.1
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-ckeditor-widget-0.1.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_ckeditor_widget-0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / django-ckeditor-widget-0.1.tar.gz
| Download URL | django-ckeditor-widget-0.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ea5042142764c061e8edf158e13c33036f5c30703590502cd8695904d6de82d
|
|
BLAKE2b-256 checksum How to use checksums |
12aa00378e79fa0952369bfbef99727e3de2aad4c3f87ccea8ca7276a05d0c5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_ckeditor_widget-0.1-py2.py3-none-any.whl
| Download URL | django_ckeditor_widget-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
48f26d98e2a452c3427f701eb21dfad0f1e2b79b7c7f6b99956453adba72eb48
|
|
BLAKE2b-256 checksum How to use checksums |
7f8c0594b4f5781be79b1666022b775e0800e49bac40f271ea9475dba6560e13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |