django-cms, django flatpages, tiny mce not displaying


django-cms, django flatpages, tiny mce not displaying



I've implemented both django-cms and flatpages, but can not get tiny_mce to display in either.

urls.py

(r'^tinymce/', include('tinymce.urls')),  from django.conf import settings if settings.DEBUG:     urlpatterns += patterns('',         (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',                 {'document_root': settings.MEDIA_ROOT}),         ) 

settings.py

TINYMCE_JS_URL = 'http://127.0.0.1:8000/site_media/js/tiny_mce/tiny_mce.js' TINYMCE_JS_ROOT = 'http://127.0.0.1:8000/site_media/js/tinymce/' TINYMCE_DEFAULT_CONFIG = {    'plugins': "table,spellchecker,paste,searchreplace",    'theme': "advanced",     'cleanup_on_startup': True,     'custom_undo_redo_levels': 10, }  TINYMCE_SPELLCHECKER = False TINYMCE_COMPRESSOR = False TINYMCE_FILEBROWSER = True CMS_USE_TINYMCE = True 

admin.py

from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin #Flatpages class FlatPageAdmin(FlatPageAdmin):     class Media:         js = ('http://127.0.0.1:8000/js/tiny_mce/tiny_mce.js',               'http://127.0.0.1:8000/js/tiny_mce/textareas.js',)  # We have to unregister it, and then reregister admin.site.unregister(FlatPage) admin.site.register(FlatPage, FlatPageAdmin) #django-cms from myprograms.cms.models import Page class PageOptions(admin.ModelAdmin):     class Media:         js = ('http://127.0.0.1:8000/site_media/js/tiny_mce/tiny_mce.js',               'http://127.0.0.1:8000/site_media/js/tiny_mce/textareas.js') #admin.site.register(Page, PageOptions) 

In the base.html file

<script type="text/javascript" src="{{ MEDIA_URL }}js/tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="{% url tinymce-js "NAME" %}"></script> 

There are so many different options when accessing the various user groups, docs, etc. I'm not sure what is the correct syntax. The CMS doesn't do me much good without some kind of text editor.

Thx




django drop down menu public template error

1:



How do I override Django's administrative change password page?
first of all please check this line with slash like:.
Is it “better” to have an update field or COUNT query?
<script type="text/javascript" src="{{ MEDIA_URL }}/js/tiny_mce/tiny_mce.js"></script> .
Why is my django view returning a zero obejct list?
also please check site_id in error logs.


How do I read a Django HTTPResponse in Flex?
had similar issue with site_id because I created new site with different id.


What's the best way to “embed” a page number in a URL?
.
Is it dangerous to leave your Django admin directory under the default url of admin?
Best, Mykola Lys..
X-Requested-With/HTTP_X_REQUESTED_WITH weird problem


2:


If you need some more features then the simple flatpages just checkout django-blocks (http://code.google.com/p/django-blocks/).

Has multi-language Menu, Flatpages and even has a simple Shopping Cart!!.


3:


Have you read the TinyMCE page on the Django wiki? Also - although it looks like it might not apply to you - browsers block calls from scripts across differing servers/domains....



79 out of 100 based on 89 user ratings 439 reviews