webguy7890
unread,Nov 21, 2009, 11:47:07 AM11/21/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TurboGears
I seem to be having some caching issue with genshi when i include 2
different files in 2 different directories with with the same name.
example:
templates/example_a/index.html
templates/example_a/_form.html <-- contains a_form()
templates/example_b/index.html
templates/example_b/_form.html <-- contains b_form()
i have two controllers, one for a, one for b:
when i visit the first controller, it will render fine, whether
it's a or b.
when i visit a as the second controller, it will say b_form() not
defined.. conversely, if i visit b as the second controller, it will
say a_form() not defined.
my guess is that the template gets cached and it can't distinguish
them with just its name. so i change the xi:include to be "../
example_a/_form.html" and "../example_b/_form.html" instead of just
"_form.html" and it worked. is this the best way to do this? or i
guess i could name it a_form.html and b_form.html. thanks.