2👍
Fragment of \venv\Lib\site-packages\tinymce\settings.py:
if 'staticfiles' in settings.INSTALLED_APPS or 'django.contrib.staticfiles' in settings.INSTALLED_APPS:
JS_URL = getattr(settings, 'TINYMCE_JS_URL',os.path.join(settings.STATIC_URL, 'tiny_mce/tiny_mce.js'))
JS_ROOT = getattr(settings, 'TINYMCE_JS_ROOT',os.path.join(settings.STATIC_ROOT, 'tiny_mce'))
else:
JS_URL = getattr(settings, 'TINYMCE_JS_URL','%sjs/tiny_mce/tiny_mce.js' % settings.MEDIA_URL)
JS_ROOT = getattr(settings, 'TINYMCE_JS_ROOT', os.path.join(settings.MEDIA_ROOT, 'js/tiny_mce'))
AFAIR ‘django.contrib.staticfiles’ is included in INSTALLED_APPS by default. Therefore tinymce should be located in static dir. Instructions about putting tinymce in media directory misled me.
0👍
Newer versions (1.4) of django use the static files app to handle admin media (i.e. /static/...
):
Starting in Django 1.4, the admin’s static files also follow this convention [using static files], to make the files easier to deploy. In previous versions of Django, it was also common to define an ADMIN_MEDIA_PREFIX setting to point to the URL where the admin’s static files live on a Web server. This setting has now been deprecated and replaced by the more general setting STATIC_URL.
So, if you are < 1.4, you can use ADMIN_MEDIA_PREFIX
to change the path used by the admin though (check this question to make sure you see how it works). Otherwise, adapt your app to make use of static files
- [Answered ]-Haystack's SearchQuerySet().filter not doing anything (Whoosh 2.4.1, Django-haystack 1.2.7)
- [Answered ]-How do I refer to a model defined later in a reference property in Google App Engine?
- [Answered ]-Django template cannot access JSON Key in duplicate quotations: {" 'Key' ": " Value "}
- [Answered ]-Cascade delete not working as it should
- [Answered ]-Output the values of the variables of django rest framework