django-summernote breaks after upgrading to Django 3
See original GitHub issueAfter upgrading my app to Django 3 I get the following error:
Traceback (most recent call last):
File "manage.py", line 23, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
django.setup()
File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/source/lib/models.py", line 8, in <module>
from django_summernote.widgets import SummernoteInplaceWidget
File "/usr/local/lib/python3.7/site-packages/django_summernote/widgets.py", line 4, in <module>
from django.contrib.staticfiles.templatetags.staticfiles import static
ModuleNotFoundError: No module named 'django.contrib.staticfiles.templatetags'
regarding to https://docs.djangoproject.com/en/dev/internals/deprecation/ that module was removed.
After investigation of the Django sources replacing should be easy:
# django 2.x django\contrib\staticfiles\templatetags\staticfiles.py
def static(path):
warnings.warn(
'django.contrib.staticfiles.templatetags.static() is deprecated in '
'favor of django.templatetags.static.static().',
RemovedInDjango30Warning,
stacklevel=2,
)
return _static(path)
I think the problem may be that the package at https://pypi.org/project/django-summernote/ is outdated. It dates from January 2019. As the problem ist already fixed in the summernote sources only a new package needs to get published.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Django-Summernote: Working fine on local machine but ...
Coding example for the question Django-Summernote: Working fine on local machine but server not posting the data-django.
Read more >How to use django-summernote in templates - Stack Overflow
I have setup django-summernote on my project and everything is great, it works very good on admin , but i want to use...
Read more >Deep dive - Summernote
You can set blockquote breaking level with blockquoteBreakingLevel option. ... Then You can use the editor API through the summernote method.
Read more >ChangeLog — django-modeltranslation dev documentation
(thanks to Wojtek Ruszczewski, resolves issue #153) * FIXED: Broken tab activation when using jquery-ui 1.10, keeping support for older jquery-ui versions and ......
Read more >We finally switched from WordPress to Django
There is a package called django-cachalot that caches ORM queries and automatically invalidates them when you save/update/delete an object it's a great solution ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Add this
X_FRAME_OPTIONS = 'SAMEORIGIN'
to your settings.py SeeI just published
0.8.11.5
with Django 3.0 support. https://github.com/summernote/django-summernote/releases/tag/0.8.11.5