On Sun, Mar 22, 2009 at 1:37 PM, nwalt...@sprynet.com
<nwalt...@sprynet.com>wrote:

>
> Can you point me to an example of how to write my own template
> filter?
> Where would I find the code for the existing urlize filter?  I'm new
> to Django - and don't know all the class structures yet.
>
> In my case, I want to add the phrase "target='_blank'" to the
> urlizetrunc filter.
> This isn't already available and I'm missing it?
>
> Thanks,
> Neal Walters
>
> >
>
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/  The urlize
filter can be found at django/templates/defaultfilters.py .  This is not
already available, although you could just apply the filter as usual and
then have a second filter that just altered the <a> tags.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~---------~--~----~------------~-------~--~----~
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