TEMPLATE_DIRS is a tuple if django >= 1.6
Minor modification
More robust check on django.VERSION