Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » How to merge TinyMCE to django flatpage [RSS Feed]

#1 June 19, 2010 14:47:59

Steven H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to merge TinyMCE to django flatpage


Hi,

I am reading the book of <Practical Django Projects - second edition>.
I want to merge a simple rich-text editor to flatpage following the chapter
3.

In the url.py ,I have added the link to the urlpatterns. like this:

urlpatterns = patterns('',
(r'^admin/',inlcude(admin.site.urls)),

(r'^tiny_mce/(?P<path>.*)$','django.views.static.serve',{'document_root':'
c:\django_workspace\cms\js\tiny_mce\\'}),
)

// the tiny_mce.js is under the path c:\django_workspace\cms\js\tiny_mce\

and then add the js script in the
templates\admin\flatpage\flatpages\change_form.html
under the {{media}} :

<script type = 'text/javascript' src='/tiny_mce/tiny_mce.js'></script>
<script type = 'text/javascript'>
tinyMCE.init(
{mode:"textaresa",
theme:"simple"
}
);
</script>


and then run the server . but no useful.

who can tell me how to fix this?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 19, 2010 17:12:06

M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

How to merge TinyMCE to django flatpage


Steven,

You need to read the 1st paragraph on page 25 closely. Also make sure
the java scripts are loaded correctly. I personally use Firefox
Firebug to debug the failing scripts.

Finally using the Django Dev Server will not display the TinyMCE
widgets. You need to make changes on your Apache Conf files to display
the widgets correctly.

_Mario

On Jun 19, 6:12 am, Steven Han <zike...@gmail.com> wrote:
> Hi,
>
> I am reading the book of <Practical Django Projects - second edition>.
> I want to merge a simple rich-text editor to flatpage following the chapter
> 3.
>
> In the url.py ,I have added the link to the urlpatterns. like this:
>
> urlpatterns = patterns('',
>     (r'^admin/',inlcude(admin.site.urls)),
>
> (r'^tiny_mce/(?P<path>.*)$','django.views.static.serve',{'document_root':'
> c:\django_workspace\cms\js\tiny_mce\\'}),
>     )
>
> // the tiny_mce.js is under the path c:\django_workspace\cms\js\tiny_mce\
>
> and then add the js script in the
> templates\admin\flatpage\flatpages\change_form.html
> under the {{media}} :
>
> <script type = 'text/javascript' src='/tiny_mce/tiny_mce.js'></script>
> <script type = 'text/javascript'>
> tinyMCE.init(
> {mode:"textaresa",
> theme:"simple"}
>
> );
> </script>
>
> and then run the server . but no useful.
>
> who can tell me how to fix this?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » How to merge TinyMCE to django flatpage [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support