mirror of
https://github.com/django-components/django-components.git
synced 2025-09-23 06:02:27 +00:00
Remove support for < Django 2.2.
This commit is contained in:
parent
f9d098529b
commit
cc8db8056e
1 changed files with 10 additions and 18 deletions
|
@ -2,23 +2,15 @@ import django
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
if not settings.configured:
|
if not settings.configured:
|
||||||
# Django 1.8 changes how you set up templates, so use different
|
settings.configure(
|
||||||
# settings for different Django versions
|
INSTALLED_APPS=('django_components',),
|
||||||
if django.VERSION >= (1, 8):
|
TEMPLATES=[{
|
||||||
settings.configure(
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
INSTALLED_APPS=('django_components',),
|
'DIRS': ["tests/templates/"],
|
||||||
TEMPLATES=[{
|
}],
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
COMPONENTS={
|
||||||
'DIRS': ["tests/templates/"],
|
'TEMPLATE_CACHE_SIZE': 128
|
||||||
}],
|
},
|
||||||
COMPONENTS={
|
)
|
||||||
'TEMPLATE_CACHE_SIZE': 128
|
|
||||||
},
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
settings.configure(
|
|
||||||
INSTALLED_APPS=('django_components',),
|
|
||||||
TEMPLATE_DIRS=["tests/templates/"],
|
|
||||||
)
|
|
||||||
|
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue