#847: AutoCompleteField in master.kid doesn't work on non-root page
-----------------------------------+----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: anonymous
Type: defect | Status: closed
Priority: normal | Milestone: 1.0
Component: Widgets | Version: 0.9a5
Severity: normal | Resolution: fixed
Keywords: |
-----------------------------------+----------------------------------------
Changes (by alberto):
* status: reopened => closed
* resolution: => fixed
Comment:
The best soultion for this problem is to list the widget instance in the
{{{tg.include_widgets}}} config options list. Resources form widgets
listed there are included in every page that needs them (that is... every
single page! ;).
in myapp/widgets.py
{{{
#!py
artist_search_form = w.ListForm(fields=SearchBox(), name="search",
submit_text="Search")
}}}
in myapp/config/app.cfg
{{{
tg.include_widgets = ['myapp.widgets.artist_search_form']
}}}
finally, in master.kid
{{{
#!xml
<div id="searchbox">
${tg_artist_search_form(action="/artists/search")}
</div>
}}}
Sorry for the delay in closing this, Elvelind implemented this long time
ago in [1576] I presume to fix precisely this issue.
Alberto
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/847>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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-tickets?hl=en
-~----------~----~----~----~------~----~------~--~---