PageRenderTime 11ms CodeModel.GetById 7ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/feincms/templatetags/feincms_compat_tags.py

http://github.com/feincms/feincms
Python | 20 lines | 10 code | 5 blank | 5 comment | 0 complexity | b29829451784afd15f28296962ff8888 MD5 | raw file
 1from django import template
 2
 3
 4register = template.Library()
 5
 6
 7def csrf_token():
 8    """
 9    Dummy implementation for older versions of Django
10    """
11
12    # Should be deprecated, Django versions prior to 1.2 aren't supported
13    # anymore.
14    return u''
15
16
17try:
18    from django.template.defaulttags import csrf_token
19except ImportError:
20    register.simple_tag(csrf_token)