On 7/11/06, Spock <[EMAIL PROTECTED]> wrote:
>     def url_to_contract(self):
>          return '<a href="/contracts/%i">%s</a>" % (self.id,self.owner)
>
>    class Admin:
>         list_filter = ( 'owner', 'url_to_contract')
>
> And when page is rendered I'dont get html link only string "<a
> href..and so on"
> Is there way to disable escaping mode from list_filter without change
> django sources ?

Yes, there's a way! Set the "allow_tags" attribute on your function. Example:

    def url_to_contract(self):
        return '<a href="/contracts/%i">%s</a>" % (self.id,self.owner)
    url_to_contract.allow_tags = True

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to