I recently got burned by r11626, which added SimpleLazyObject to
1.1.x. I have a templatetag that linkifies a user-object, and it
checks whether it is given a django.contrib.auth.models.User, an int
(looks up a User) or a profile (looks up the User). This check was
done with type(). Unfortunately, type(SimpleLazyObject) !=
type(User()), so I had a "fun" TemplateSyntaxError in my hands.

However, the TemplateSyntaxError never happened if there was an
instance of {{ user }} before the {% prettylinktouser user %} in the
template, thus it seems to me that just outputting a SimpleLazyObject
somehow unlazifies it. So, how can a SimpleLazyObject be unlazified
everywhere else?


HM

--

You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.


Reply via email to