Django-editor
Allows pluggable WYSIWYG editors in django admin without hard dependencies.
Currently supported editors (both optional):
Installation
Install with pip:
pip install django-editor
(optional) Add imperavi or tinymce to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = ( ... # Imperavi (or tinymce) rich text editor is optional 'imperavi', )
Usage
editor package gives you the following replacement classes:
django.forms.widgets.Textarea => editor.EditorWidget (becomes ImperaviWidget or TinyMCE)
django.contrib.admin.ModelAdmin => editor.EditorAdmin (becomes ImperaviAdmin or stays as ModelAdmin)
django.contrib.admin.StackedInline => editor.EditorStackedInline (becomes ImperaviStackedInline or stays as StackedInline)
Here are some examples on how to easily turn your Textareas into WYSIWYG editors:
# admin.py
from django.db import models
from django.contrib import admin
from editor.admin import EditorAdmin, EditorWidget, EditorStackedInline
class MyInlineAdmin(EditorStackedInline): # StackedInline example
model = Model1
class MyModel2Admin(EditorAdmin): # ModelAdmin example
inlines = [MyInlineAdmin]
admin.site.register(Model2, MyModel2Admin)
class MyModel3Admin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': EditorWidget},
}
admin.site.register(Model3, MyModel3Admin)
Credits
django-newsletter for providing pluggable editor code idea
News
0.2a1
Release date: UNRELEASED
Working on more editors. Stay tuned…
0.1
Release date: 19-Mar-2013
Initial release
Supports django-imperavi and django-tinycme
3 admin classes: EditorAdmin, EditorWidget, EditorStackedInline
Test coverage
Metadata
Release files for django-editor 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 | Provenance | |
|---|---|---|---|---|
| django-editor-0.1.tar.gz | 6.2 kB | Without provenance | Details |
Release files / django-editor-0.1.tar.gz
| Download URL | django-editor-0.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d66f773451de16f17d681f6e1261acfee6d9c14c69f725246b2a52226e70e7b2
|
|
BLAKE2b-256 checksum How to use checksums |
54a884fa891bb05b5412b4f7c91e1fe5d5f97cc83e2ae8b825bbd75e6ac1755c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-editor 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.