summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2021-03-10 20:52:59 (GMT)
committerChristian Pointner <equinox@helsinki.at>2021-03-22 21:15:15 (GMT)
commit8154c30318127e0491786b65975bee808cd8e27b (patch)
tree5524644d4bcb2f341b452f5d2a38591bed600c48
parentb2415eb92622563f567106e2c4951ed498273e53 (diff)
tinymce: upgrade and disable drag&drop for images
-rw-r--r--program/urls.py6
-rw-r--r--pv/settings.py9
-rw-r--r--requirements.txt2
3 files changed, 9 insertions, 8 deletions
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<path>.*)$', 'django.views.static.serve', {'document_root': PROGRAM_SITE_MEDIA}))
+ url(r'^site_media/(?P<path>.*)$', '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