On 2010-01-16 at 14:37:38 -0800, Tomasz Zieliński wrote:
> On 16 Sty, 20:31, "Aaron C. de Bruyn" <goo...@darkpixel.com> wrote:
> > Am I missing an easy way to check if an application is installed
> > so I can make decisions in a template?
> 
> AFAIK there is no such feature, but I think you could
> write template context processor exposing necessary flags to
> templates.

I dove into django/template/defaulttags.py to figure out how the 'if'
tag works, and I came up with this solution.

http://github.com/darkpixel/irontickets/blob/master/irontickets/templatetags/ifloaded.py

Critiques welcome ;)

-A

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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