Jonathan,
Very useful tip. I suppose I got myself into the problem by
originally using the genshi template example from 0.3.6 and then doing
an easy-install to the dev version and not knowing how to fix it
easily. I think I will go ahead and follow your advice then and go
back to the development version.
Now I just need to get the rest of the guys I work with onto that
version as well.
-Noah
(btw, I liked your talk at PyCon..)
On 4/11/07, Jonathan LaCour <[EMAIL PROTECTED]> wrote:
>
> Noah Gift wrote:
>
> > UndefinedError: "logging_in" not defined
> >
> > I think it might have to do with the version of genshi, as other
> > people I work with were using an older version of genshi, I think 3?
> > I just bought a new laptop and did a "new" easy_install and I think I
> > grabbed a newer version from easy_install that broke things.
>
> I also had this problem recently, and it turns out that the issue has
> something to do with the way that newer versions of genshi look for
> template variables. In this particular case, the "logging_in" variable
> doesn't exist in the template (meaning it is not being passed into the
> template at all). Older versions of genshi ignored this problem and
> would
> just return None (I think) when you accessed an undefined variable.
>
> You can fix this and stay with the latest and greatest version of genshi
> by changing your master template to check to see if the variable is
> actually
> defined, before accessing it:
>
> <div py:if="tg.config('identity.on',False)
> and not locals().get('logging_in', False)">
>
> This should solve your problem!
>
> --
> Jonathan LaCour
> http://cleverdevil.org
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---