Here's a template filter that has been working without problems till
recently, before I updated Django source:

from pm_core.models import PMUser

@register.filter
def can_manage_market(user, market):
    if not isinstance(user, PMUser): return False
    return user.can_manage_market(market)

The filter has begun to return false always. The problem seems to be
that the 'user' instance is of 'SimpleLazyObject' instead of PMUser (a
subclass of User). Searching it up on the internet brought me to
Ticket #12049, which indicates that this may be a similar bug
(however, the patch provided there is not a remedy, unfortunately).
Should I file a ticket, or is there anything I am missing?

Thanks in advance,
Ozgur.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to