[Django 1.9] Do not use TemplateDoesNotExist from Django

TemplateDoesNotExist was removed from Django 1.9. This is a trivial
class which exists only to raise exception, and which can easily be
redefined in our code.

Change-Id: I593864d7e6e97f9244fd2b0717351136b6547323
Closes-Bug: #1534553
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Partially-Implements: blueprint drop-dj17
This commit is contained in:
Thomas Goirand 2016-01-15 11:00:01 +00:00 committed by Rob Cresswell
parent eb2554ad9b
commit e44c17a6e8

View File

@ -19,7 +19,10 @@ import os
import django
from django.conf import settings
from django.template.base import TemplateDoesNotExist # noqa
if django.VERSION >= (1, 9):
from django.template.exceptions import TemplateDoesNotExist
else:
from django.template.base import TemplateDoesNotExist # noqa
if django.get_version() >= '1.8':
from django.template.engine import Engine