mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-05-28 08:48:21 +00:00
Merge branch 'master' of github.com:mpasternak/django-dbtemplates-iplweb
This commit is contained in:
commit
8901551893
3 changed files with 9 additions and 9 deletions
|
|
@ -65,7 +65,7 @@ class Command(BaseCommand):
|
|||
tpl_dirs = app_template_dirs + DIRS
|
||||
else:
|
||||
tpl_dirs = DIRS + app_template_dirs
|
||||
templatedirs = [d for d in tpl_dirs if os.path.isdir(d)]
|
||||
templatedirs = [str(d) for d in tpl_dirs if os.path.isdir(d)]
|
||||
|
||||
for templatedir in templatedirs:
|
||||
for dirpath, subdirs, filenames in os.walk(templatedir):
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import django
|
||||
from django.core import signals
|
||||
from django.contrib.sites.models import Site
|
||||
from django.template.defaultfilters import slugify
|
||||
|
|
@ -9,8 +10,12 @@ def get_cache_backend():
|
|||
"""
|
||||
Compatibilty wrapper for getting Django's cache backend instance
|
||||
"""
|
||||
from django.core.cache import _create_cache
|
||||
cache = _create_cache(settings.DBTEMPLATES_CACHE_BACKEND)
|
||||
if django.VERSION[0] >= 3 and django.VERSION[1] >= 2:
|
||||
from django.core.cache import caches
|
||||
cache = caches.create_connection(settings.DBTEMPLATES_CACHE_BACKEND)
|
||||
else:
|
||||
from django.core.cache import _create_cache
|
||||
cache = _create_cache(settings.DBTEMPLATES_CACHE_BACKEND)
|
||||
# Some caches -- python-memcached in particular -- need to do a cleanup at
|
||||
# the end of a request cycle. If not implemented in a particular backend
|
||||
# cache.close is a no-op
|
||||
|
|
|
|||
7
tox.ini
7
tox.ini
|
|
@ -12,7 +12,6 @@ envlist =
|
|||
|
||||
[gh-actions]
|
||||
python =
|
||||
3.5: py36
|
||||
3.6: py36
|
||||
3.7: py37
|
||||
3.8: py38, flake8
|
||||
|
|
@ -21,7 +20,6 @@ python =
|
|||
|
||||
[testenv]
|
||||
basepython =
|
||||
py35: python3.5
|
||||
py36: python3.6
|
||||
py37: python3.7
|
||||
py38: python3.8
|
||||
|
|
@ -32,9 +30,6 @@ setenv =
|
|||
DJANGO_SETTINGS_MODULE = dbtemplates.test_settings
|
||||
deps =
|
||||
-r requirements/tests.txt
|
||||
dj111: Django<2.0
|
||||
dj20: Django<2.1
|
||||
dj21: Django<2.2
|
||||
dj22: Django<2.3
|
||||
dj30: Django<3.1
|
||||
dj31: Django<3.2
|
||||
|
|
@ -50,7 +45,7 @@ commands =
|
|||
coverage xml
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python3.8
|
||||
basepython = python3.9
|
||||
commands = flake8 dbtemplates
|
||||
deps = flake8
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue