From 8154c30318127e0491786b65975bee808cd8e27b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 10 Mar 2021 21:52:59 +0100 Subject: tinymce: upgrade and disable drag&drop for images diff --git a/program/urls.py b/program/urls.py index 776b9c0..78b9af4 100644 --- a/program/urls.py +++ b/program/urls.py @@ -4,10 +4,6 @@ from django.views.decorators.cache import cache_page import views -import os - -PROGRAM_SITE_MEDIA = os.path.join(os.path.dirname(__file__), '../site_media') - urlpatterns = patterns('', url(r'^today/?$', views.DayScheduleView.as_view()), url(r'^week/?$', views.WeekScheduleView.as_view()), @@ -36,4 +32,4 @@ urlpatterns = patterns('', if settings.DEBUG: urlpatterns += \ patterns('', - url(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': PROGRAM_SITE_MEDIA})) + url(r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT})) diff --git a/pv/settings.py b/pv/settings.py index 47b9d2e..41da596 100644 --- a/pv/settings.py +++ b/pv/settings.py @@ -90,11 +90,16 @@ INSTALLED_APPS = ( 'tinymce', ) -TINYMCE_JS_URL = '/static/js/tiny_mce/tiny_mce.js' TINYMCE_DEFAULT_CONFIG = { - 'plugins': 'contextmenu', + 'plugins': 'advimage,advlink,advlist,autoresize,contextmenu,paste', 'theme': 'advanced', 'theme_advanced_toolbar_location': 'top', + 'theme_advanced_toolbar_align': 'center', + 'theme_advanced_statusbar_location': 'bottom', + 'theme_advanced_resizing': 'true', + 'theme_advanced_path': 'false', + 'theme_advanced_buttons3_add': 'separator,pastetext,pasteword,selectall', + 'paste_block_drop': 'true', } CACHE_BACKEND = 'locmem://' diff --git a/requirements.txt b/requirements.txt index ce6754c..e4bc92f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ Django==1.8.14 MySQL-python==1.2.5 Pillow==3.3.0 PyYAML==3.11 -django-tinymce==2.3.0 +django-tinymce==2.6.1 python-dateutil==2.5.3 -- cgit v0.10.2