Hi all,
I'm glad to notice your interest in dojo in turbogears so,
percious: I'll do it, also because I'm using genshi in all my projects
and I'd like to pull out kid.
Chris: thank you for your suggestions, I surely will do all the things
you suggested.
André: the default inclusion of TG css is in the master template, so
if you don't include it you don't include the css either.
If you use the widget version, you shouldn't add the lines i wrote in
the first response.
You should import dojo from the controller doing:
from dojo import dojo
and adding a reference to the dojo object in the returned dict, like:
@expose(template='.templates.welcome):
def index(self,*args,**kwargs):
hello='Hello World!'
return dict(message=hello,dojo=dojo)
Please notice that the package name, as suggested by Chris, will
eventually change to TGDojo for the TurboGears version
and TWDojo for the ToscaWidget version.
This morning I did few methods to replicate the dojo.require methods
in the widget.
I'll post this version, after polishing some code, later today or
tomorrow
Given your interest, i'll setup a svn repository in the next days.
Michele.
On 2 Apr, 13:05, apm <[EMAIL PROTECTED]> wrote:
> hi
>
> On Apr 1, 6:59 pm, mbertoldi <[EMAIL PROTECTED]> wrote:
>
> > Hi André,
> > there isn't a Widget version of Dojo,
> > but if you download the latest version and put dojo,dijit and dojox
> > folder in the static/javascript subfolder of your project
> > you can use:
>
> > <script type="text/javascript" src="${tg.url('/static/javascript/dojo/
> > dojo.js')}" djConfig="isDebug: false, parseOnLoad: true"></script>
>
> > in your master.kid (or master.html using genshi) to load the dojo
> > toolkit in all your pages.
>
> i cannot get this to work with the master template. as soon as i
> include master.html (genshi) in my template there is no more dojo
> (even with the script tag in my template). removing the master.html
> inclusion and adding the script tag into my template directly does
> work (following the instructions at [1]), but then there is no TG
> css... where is the conflict?
>
> i could not figure out how to solve this when looking at your widget,
> either, because the template folder is empty. what am i missing?
>
> thanks again
> andré
>
> [1]http://dojotoolkit.org/book/dojo-book-0-9/hello-world-tutorial
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---