include my own java script into turbogears 2.0

3 views
Skip to first unread message

Thang Nguyen

unread,
Dec 21, 2009, 4:25:21 PM12/21/09
to turbo...@googlegroups.com
Hi,

Is it possible that I can include my own java script in Genshi
template without writting ToscaWidgets?
Here is what I have in my template but it does not seem to work. It
does not pick up my script.

<script src="${tg.url('/public/javascript/mylayout.js')}"></script>

I am using TG 2.0. Is the above method only applicable in TG 1.0?
btw, my /public directory resides at the same level as /conrollers and
/templates directories.

thanks much in advance.
Thang

Wesley Dyk

unread,
Dec 22, 2009, 5:13:57 PM12/22/09
to turbo...@googlegroups.com
> --
>
> You received this message because you are subscribed to the Google Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
>
>
>

Strip out the /public part of the path and it should work.

Wes

Thang Nguyen

unread,
Dec 24, 2009, 9:15:19 PM12/24/09
to turbo...@googlegroups.com
Hi Wes,

Yes, it works. Thanks much for your help.

Happy Holidays!

tpn

Reply all
Reply to author
Forward
0 new messages