Remove support for < Django 2.2.

This commit is contained in:
Emil Stenström 2021-03-24 22:39:14 +01:00
parent f9d098529b
commit cc8db8056e

View file

@ -2,23 +2,15 @@ import django
from django.conf import settings
if not settings.configured:
# Django 1.8 changes how you set up templates, so use different
# settings for different Django versions
if django.VERSION >= (1, 8):
settings.configure(
INSTALLED_APPS=('django_components',),
TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ["tests/templates/"],
}],
COMPONENTS={
'TEMPLATE_CACHE_SIZE': 128
},
)
else:
settings.configure(
INSTALLED_APPS=('django_components',),
TEMPLATE_DIRS=["tests/templates/"],
)
settings.configure(
INSTALLED_APPS=('django_components',),
TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ["tests/templates/"],
}],
COMPONENTS={
'TEMPLATE_CACHE_SIZE': 128
},
)
django.setup()