tags:

views:

54

answers:

2

I got tinyMCE working for flat pages by copying the change_form.html file and embedding a script element.

I followed the directions here but still have issues. I added this snippet to my Entry model:

class Entry( models.Model ):

    class Admin:
        # various admin options are here
        js = (
                '/tiny_mce/tiny_mce.js',
                '/appmedia/admin/js/textareas.js',
            )

When I view source in my add entry admin page ( after restarting Apache2 ) I don't see the above referenced js files anywhere.

A: 

Ended up resorting to django-tinymce, had to modify my app's admin.py and define a class for the AdminForm, override the form attribute with my newly created class, and tinyMCE finally showed up.

meder
+1  A: 

The directions you linked to are very old, and in particular date back to before the 'newforms-admin' changes were made. You need to add the js tuple to your admin class's inner Media class, as described here.

Daniel Roseman