Registry / web-framework / django-summernote

django-summernote

JSON →
library0.8.20.0pypypi✓ verified 85d ago

A Django integration for the Summernote WYSIWYG editor. Current version 0.8.20.0. Releases are infrequent; the library is in maintenance mode.

pip install django-summernote
INSTALL
IMPORT
SIG · DJANGO-SUMMERNOTE
D
django-summernote
web-frameworkpythonv0.8.20.0
Install
4.6s avg
Import
Disk
69MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.20.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 70.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.6s · import 0.000s · 71MB
69MB installed
● package 69MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SummernoteWidget
from django_summernote.widgets import SummernoteWidget
from summernote.widgets import SummernoteWidget

Basic admin integration with Summernote for a Post model with a content field.

INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'summernote', ] # settings.py SUMMERNOTE_CONFIG = { 'summernote': { 'width': '100%', 'height': '480', }, } # admin.py from django.contrib import admin from summernote.admin import SummernoteModelAdmin from .models import Post class PostAdmin(SummernoteModelAdmin): summernote_fields = ('content',) admin.site.register(Post, PostAdmin)
Debug
Known issues
breakingX-Frame-Options setting is now per-view (since 0.8.19.0). If you previously set X_FRAME_OPTIONS globally to 'SAMEORIGIN', that may still work but the view now sets its own header, which could override your setting. Review your deployment.
fix
Ensure your Django X_FRAME_OPTIONS setting is compatible or adjust per-view if needed.
affects: >=0.8.19.0
gotchaDo NOT add 'summernote' to INSTALLED_APPS? Actually you MUST add it. It's required for the static files and admin integration.
fix
Always include 'summernote' in INSTALLED_APPS.
affects: all
gotchaThe 'summernote_fields' attribute is only for SummernoteModelAdmin. If you use a custom form, you must manually set the widget to SummernoteWidget.
fix
Use summernote_fields = ('field1', 'field2') in the admin class that extends SummernoteModelAdmin.
affects: all
deprecatedOld import paths like 'from summernote import SummernoteWidget' are deprecated. Always import from the correct module.
fix
Use 'from summernote.widgets import SummernoteWidget'
affects: all
Upgrade
Version history
0.8.20.0latest on PyPI · released Oct 14, 2021
Audit
Dependencies
djangorequiredRequired framework
PillowrequiredImage processing for uploads
Agent activity
2 hits · last 30 days
node
2
Resources
django-summernote — pip install django-summernote · libregistry