On Dec 8, 2006, at 11:22 PM, Ian Wilson wrote:

>
> If I have something like this:
> layout.kid
> ...
> <div py:if="defined('getContent')" py:replace="getContent()">
> ...
>
>
> newaccount.kid
> <div ... py:layout="'layout.kid'">
> ...
> <div py:def="getContent()">
>     ${newAccountForm(**newAccountData)}
> </div>
> ...
>
>
> newAccountForm = TableForm(name='newAccountForm',
>         action='saveAccount', submit_text='Save',
>         fields=[TextField(name='userName', label='User Name:'),
>             TextField(name='emailAddress', label='Email Address:'),
>             PasswordField(name='password', label='Password:'),
>             PasswordField(name='verifyPassword', label='Verify  
> Password:'),
>             CalendarDatePicker(name='dateOfBirth',
> label='Birthday(Optional):')],
>         hidden_fields=[HiddenField(name='forwardUrl')]
>
> And the problem is that CalendarDatePicker's javascript is not being
> included when I use the newaccount template.
>
> How can I fix this?

I'm not very familiar (read: not at all) with Kid's py:layout so I'll  
give some theory see if you can figure it out:

CSS and JS are included by some code in turbogears/view/templates/ 
sitetemplate.kid which your project's master.kid should inherit from.  
If this code isn't called then resources will not be included.

You could try to duplicate that code from sitetemplate if it's not  
being called in your layout template to achieve the same effect.

Alberto

--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to