I must be more clear.

I didn't mean 'has not been defined', I actually meant that the value
has been defined, but set to Nothing.

ie

c.category = None

i would expect the context object to return None when in my template,
because that's what I set it as.


On Jul 25, 5:13 pm, "The Devil's Programmer"
<[email protected]> wrote:
> I'm using pylons, and when I access a value from the context which has
> not been defined, instead of returning None like you'd expect it to,
> it returns a class of type 'jinja2.runtime.Undefined'
>
> It's screwing up my url generation, because when I try to generate a
> url with category=c.category, and category is set to None (ie..user
> not currently browsing a specific category), it tries to match a url
> with category=Undefined.
>
> I see no reason for this behavior. When would that Undefined class
> ever be useful to the template?
>
> And yes,
> config['pylons.strict_c'] = True
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" 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/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to