Hi Oleg

You must create your admin config eg:

class ArticleOptions(admin.ModelAdmin):
    ....
    class Media:
        js = ('/static_media/js/tiny_mce/tiny_mce.js', '/static_media/
js/textareas.js')


Please check if it correspond to your urs.
good luck
kamil

On Jan 13, 9:43 pm, "Oleg Oltar" <oltarase...@gmail.com> wrote:
> Hi!
>
> I want to add tinyMCE to my project's admin site. I downloaded the latest
> version of the editor, added the js/tiny_mce to my media files
>
> Added following to my urls.py
> from django.conf.urls.defaults import *
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('django.views.generic.simple',
>                        (r'^contacts$',
> 'direct_to_template',{'template':'visitcard/contacts.html'} ),
>                        (r'^construction$',
> 'direct_to_template',{'template':'visitcard/construction.html'}),
>                        (r'^portfolio1$',
> 'direct_to_template',{'template':'visitcard/portfolio.html'}),
>                        (r'^partners$',
> 'direct_to_template',{'template':'visitcard/partners.html'}),
>                        (r'^articles$',
> 'direct_to_template',{'template':'visitcard/artilcles.html'}),
>                        (r'^portfolio$',
> 'direct_to_template',{'template':'visitcard/portfolio1.html'}),
>                        (r'^dom_karkasnij$', 'direct_to_template',
> {'template':'visitcard/dom_karkas.html'}),
>                        (r'^$',
> 'direct_to_template',{'template':'visitcard/index.html'} ),
>
>                        )
>
> urlpatterns +=  patterns('',
>
> (r'^tiny_mce/(?P<path>.*)$','django.views.static.serve',
>                           {'document_root':
> '/Users/oleg/Desktop/TECHNOBUD/TEMPLATES/static_media/js/tiny_mce' }),
>                          (r'^admin/', include('cms.admin_urls')),
>                          (r'^admin/(.*)', admin.site.root),
>                          )
>
> Also created the config for tinyMCE: textareas.js
> tinyMCE.init({
>     mode : "textareas",
>     theme : "advanced",
>     //content_css : "/appmedia/blog/style.css",
>     theme_advanced_toolbar_location : "top",
>     theme_advanced_toolbar_align : "left",
>     theme_advanced_buttons1 :
> "fullscreen,separator,preview,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,separator,image,cleanup,help,separator,code",
>     theme_advanced_buttons2 : "",
>     theme_advanced_buttons3 : "",
>     auto_cleanup_word : true,
>     plugins :
> "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,fullscreen",
>     plugin_insertdate_dateFormat : "%m/%d/%Y",
>     plugin_insertdate_timeFormat : "%H:%M:%S",
>     extended_valid_elements :
> "a[name|href|target=_blank|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
>     fullscreen_settings : {
>         theme_advanced_path_location : "top",
>         theme_advanced_buttons1 :
> "fullscreen,separator,preview,separator,cut,copy,paste,separator,undo,redo,separator,search,replace,separator,code,separator,cleanup,separator,bold,italic,underline,strikethrough,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,help",
>         theme_advanced_buttons2 :
> "removeformat,styleselect,formatselect,fontselect,fontsizeselect,separator,bullist,numlist,outdent,indent,separator,link,unlink,anchor",
>         theme_advanced_buttons3 :
> "sub,sup,separator,image,insertdate,inserttime,separator,tablecontrols,separator,hr,advhr,visualaid,separator,charmap,emotions,iespell,flash,separator,print"
>     }
>
> });
>
> My models file:
> from django.db import models
>
> class Article(models.Model):
>     title = models.CharField(max_length=60)
>     body = models.TextField(max_length=3000)
>     slug = models.SlugField(unique=True)
>
> The editor is still not appearing on my admin interface, when I am trying to
> add articles... Did I miss something? Please help me to understand the
> problem
>
> Thanks,
> Oleg
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to