On Oct 25, 8:47 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi. I'm using django 1.0 over at webfaction. I have the following > setup > > /static (serves js, css, flash, images etc) > /www (my django app) > > I have tiny_mce loaded to /static/js/tiny_mce/ > > I have followed the steps at this page: > http://code.djangoproject.com/wiki/AddWYSIWYGEditor > in this order: > > 1. Install tiny_mce on your server some where > 2. create a textareas.js file (placed in /static/js/tiny_mce/) > 3. created an admin.py file in my website located at www/learn/ as > follows: > > from django.contrib.flatpages.models import FlatPage > from django.contrib.flatpages.admin import FlatPageAdmin as > FlatPageAdminOld > > class FlatPageAdmin(FlatPageAdminOld): > class Media: > js = ('js/tiny_mce/tiny_mce.js', > 'js/tiny_mce/textareas.js',) > > # We have to unregister it, and then reregister > admin.site.unregister(FlatPage) > admin.site.register(FlatPage, FlatPageAdmin) > > step3 i'm confused on. This is for newforms with flatpages per the > documentation. It is my understanding that django 1 uses newforms. > Why won't the admin show the tinymce in place of text areas?
Try pointing your browser to the js files. See if you can access them. Also, look at the header of the flatpages admin page to see if the url to the js files are correct. Is /static/ your MEDIA_URL? I ask all these questions because when you specify the class Media: js = (...) in an admin.py, Django appends the MEDIA_URL to the js URL so 'js/tiny_mce/textareas.js' becomes '/static/ js/tiny_mce/textareas.js' if MEDIA_URL = /static/. If you don't want your js files to be in MEDIA_URL, set the url to /js/tiny_mce/ textareas.js/ (notice the first slash). If the URL is correct, does Apache (or other webserver) serve it correctly? John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---