mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-03-16 22:20:28 +00:00
settings do not include DATABASE_ENGINE in django 1.4
This commit is contained in:
parent
33c1197ad1
commit
250afd29f4
1 changed files with 5 additions and 1 deletions
|
|
@ -33,7 +33,11 @@ class Loader(BaseLoader):
|
|||
# in the cache indicating that queries failed, with the current
|
||||
# timestamp.
|
||||
site = Site.objects.get_current()
|
||||
display_name = 'dbtemplates:%s:%s:%s' % (settings.DATABASE_ENGINE,
|
||||
if hasattr(settings,'DATABASES'):
|
||||
database_engine=settings.DATABASES['default']['ENGINE']
|
||||
else:
|
||||
database_engine=settings.DATABASE_ENGINE
|
||||
display_name = 'dbtemplates:%s:%s:%s' % (database_engine,
|
||||
template_name, site.domain)
|
||||
cache_key = get_cache_key(template_name)
|
||||
if cache:
|
||||
|
|
|
|||
Loading…
Reference in a new issue