I have tried using tinymce in my sample django application, but i am not getting the tinymce editor in my admin pages.
I am trying to setup tinymce to use in admin pages and using Django 1.4
This is how my settings.py file looks like
MEDIA_ROOT = ' '
MEDIA_URL = ' '
STATIC_ROOT = ' '
STATIC_URL = '/static/'
TINYMCE_JS_URL = os.path.join(PROJECT_ROOT, "static/js/tiny_mce/tiny_mce.js")
TINYMCE_DEFAULT_CONFIG = {
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
'cleanup_on_startup': True,
'custom_undo_redo_levels': 10,
}
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True
And in my app, the models.py file looks like below
class place(models.Model):
place_description = models.TextField(max_length=5000)
And my admin.py field looks like below:
class PlaceDetailsAdmin(admin.ModelAdmin):
class Media:
js = ('/Users/Sreekanth/django_demo/godjango/sample/sample/static/js/tiny_mce/tiny_mce.js',
'/Users/Sreekanth/django_demo/godjango/sample/sample/static/js/textareas.js'
)
And the tiny_mce is stored in the /static/js/ folder inside my project.
With the above settings, when i login to admin, i can not see any tinymce editor for place_description field.
Could someone please let me know what i am missing?
Thanks
Sreekanth
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7-rfBYYoCpoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment