From 2fe61a156cae835c886bb07f932b3da4a15d68c7 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Wed, 26 Sep 2012 16:09:48 -0400 Subject: hopefully fixed the uploaded image urls for tinymce --- askbot/setup_templates/tinymce_sample_config.py | 1 + askbot/startup_procedures.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/askbot/setup_templates/tinymce_sample_config.py b/askbot/setup_templates/tinymce_sample_config.py index ac49da68..11085212 100644 --- a/askbot/setup_templates/tinymce_sample_config.py +++ b/askbot/setup_templates/tinymce_sample_config.py @@ -3,6 +3,7 @@ TINYMCE_SPELLCHECKER = False TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'default/media/js/tinymce/') TINYMCE_URL = STATIC_URL + 'default/media/js/tinymce/' TINYMCE_DEFAULT_CONFIG = { + 'convert_urls': False, 'plugins': 'askbot_imageuploader,askbot_attachment', 'theme': 'advanced', 'content_css': STATIC_URL + 'default/media/style/tinymce/content.css', diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 091338e5..b9146189 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -598,6 +598,28 @@ def test_tinymce(): compressor_on = getattr(django_settings, 'TINYMCE_COMPRESSOR', False) if compressor_on is False: errors.append('add line: TINYMCE_COMPRESSOR = True') + #todo: add pointer to instructions on how to debug tinymce: + #1) add ('tiny_mce', os.path.join(ASKBOT_ROOT, 'media/js/tinymce')), + # to STATIFILES_DIRS + #2) add this to the main urlconf: + # ( + # r'^m/(?P.*)$', + # 'django.views.static.serve', + # {'document_root': static_root} + # ), + #3) disable `compressor_on` check above + #then - tinymce compressing will be disabled and it will + #be possible to debug custom tinymce plugins that are used with askbot + + + default_config = getattr(django_settings, 'TINYMCE_DEFAULT_CONFIG', None) + if default_config: + if 'convert_urls' in default_config: + message = "set 'convert_urls':False in TINYMCE_DEFAULT_CONFIG" + else: + message = "add to TINYMCE_DEFAULT_CONFIG\n'convert_urls': False," + errors.append(message) + #check js root setting - before version 0.7.44 we used to have #"common" skin and after we combined it into the default -- cgit v1.2.3-1-g7c22