Here is my setup:
urls.py
....
url(r'^tinymce/', include('tinymce.urls')),
....
settings.py
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
TINYMCE_DEFAULT_CONFIG = {
"theme_advanced_buttons1": ("formatselect,"
"separator, bold, italic, "
"underline, strikethrough, separator,"
"justifyleft,justifycenter, justifyright,"
"justifyfull, separator, bullist, numlist,"
"separator, link, code")
}
TINYMCE_SPELLCHECKER = False
TINYMCE_COMPRESSOR = False
TINYMCE_JS_URL = '/static/js/tiny_mce/tiny_mce.js'
TINYMCE_JS_ROOT = '/static/js/tiny_mce'
my_template.html
{% extends '_layout.html' %}
{% block extra_head %}
{{ form.media }}
{% endblock %}
forms.py
class VenueForm(ModelForm):
.....
class Meta:
widgets = {
'description': TinyMCE(attrs={'cols': 100, 'rows': 10}),
}
I've been searching through the documentation and other SO threads and I thought I had set it correctly. However, I'm getting the error:
ReferenceError: django is not defined
}(django.jQuery));
which is the last line in static/django_tinymce/init_tinymce.js
.
All my resources are loading fine, no 404 error in the console
What am I missing? I've been struggling with this for the past two hours. Thank you