import django if django.VERSION[0] >=1 and django.VERSION[1] > 1: pass else: from django import template register = template.Library() @register.tag def csrf_token(parser, token): return ""