c4a7decf197e5ee7e33361c559c29c32a1eb4e54
[fnpdjango.git] / fnpdjango / templatetags / fnp_annoy.py
1 from django.conf import settings
2 from django import template
3 register = template.Library()
4
5
6 @register.simple_tag
7 def annoy():
8     """Annoy people with 1-percent tax plead.
9
10     To use, set FNP_ANNOY to True
11     and add fnpdjango/annoy/annoy.{css,js} to your template.
12     """
13     if getattr(settings, 'FNP_ANNOY', False):
14         return template.loader.render_to_string('fnpdjango/annoy.html')
15     else:
16         return u""