mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-03-16 22:20:28 +00:00
Merge branch 'release/1.1.1'
This commit is contained in:
commit
ecbca49616
9 changed files with 37 additions and 9 deletions
|
|
@ -12,4 +12,8 @@ command, integrates with Django's caching system and the admin actions.
|
|||
|
||||
Please see http://django-dbtemplates.readthedocs.org/ for more details.
|
||||
|
||||
The source code and issue tracker can be found on Github:
|
||||
|
||||
https://github.com/jezdez/django-dbtemplates
|
||||
|
||||
.. _template loader: http://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
VERSION = (1, 1, 0, "f", 0) # following PEP 386
|
||||
VERSION = (1, 1, 1, "f", 0) # following PEP 386
|
||||
DEV_N = None
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import os
|
|||
import shutil
|
||||
import tempfile
|
||||
|
||||
from django.core.cache.backends.base import BaseCache
|
||||
from django.core.management import call_command
|
||||
from django.template import loader, Context
|
||||
from django.test import TestCase
|
||||
|
|
@ -12,6 +13,7 @@ from django.contrib.sites.models import Site
|
|||
|
||||
from dbtemplates.conf import settings
|
||||
from dbtemplates.models import Template
|
||||
from dbtemplates.utils.cache import get_cache_backend
|
||||
from dbtemplates.utils.template import get_template_source
|
||||
from dbtemplates.management.commands.sync_templates import (FILES_TO_DATABASE,
|
||||
DATABASE_TO_FILES)
|
||||
|
|
@ -91,3 +93,6 @@ class DbTemplatesTestCase(TestCase):
|
|||
temp_template.close()
|
||||
settings.TEMPLATE_DIRS = old_template_dirs
|
||||
shutil.rmtree(temp_template_dir)
|
||||
|
||||
def test_get_cache(self):
|
||||
self.assertTrue(isinstance(get_cache_backend(), BaseCache))
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from dbtemplates.conf import settings
|
|||
|
||||
|
||||
def get_cache_backend():
|
||||
return get_cache(settings.CACHE_BACKEND)
|
||||
return get_cache(settings.DBTEMPLATES_CACHE_BACKEND)
|
||||
|
||||
cache = get_cache_backend()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,28 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
1.1.1 (07-08-11)
|
||||
----------------
|
||||
|
||||
* Fixed bug in cache loading (again).
|
||||
|
||||
* Fixed bugs in the documentation.
|
||||
|
||||
.. note::
|
||||
|
||||
Since ``dbtemplates`` removed support for Django lower than 1.2 you
|
||||
have to use the template loader class in the ``TEMPLATE_LOADERS``
|
||||
(``'dbtemplates.loader.Loader'``) and **not** the previosly included
|
||||
function that ended with ``load_template_source``.
|
||||
|
||||
1.1 (07-06-11)
|
||||
--------------
|
||||
|
||||
* **BACKWARDS-INCOMPATIBLE** Requires Django 1.2 or higher.
|
||||
For previous Django versions use an older versions of dbtemplates, e.g.::
|
||||
For previous Django versions use an older versions of ``dbtemplates``,
|
||||
e.g.::
|
||||
|
||||
$ pip install django-dbtemplates<1.1
|
||||
$ pip install "django-dbtemplates<1.1"
|
||||
|
||||
* Added South migrations.
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ copyright = u'2007-2011, Jannis Leidel'
|
|||
# The short X.Y version.
|
||||
version = '1.1'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.1'
|
||||
release = '1.1.1'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ It also features optional support for :ref:`versioned storage <versioned>`
|
|||
and :ref:`django-admin command <commands>`, integrates with Django's
|
||||
:ref:`caching system <caching>` and the :ref:`admin actions <admin_actions>`.
|
||||
|
||||
Please see http://django-dbtemplates.readthedocs.org/ for more details.
|
||||
|
||||
The source code and issue tracker can be found on Github: https://github.com/jezdez/django-dbtemplates
|
||||
|
||||
.. _template loader: http://docs.djangoproject.com/en/dev/ref/templates/api/#loading-templates
|
||||
|
||||
Contents:
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ Setup
|
|||
It should look something like this::
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.load_template_source',
|
||||
'django.template.loaders.app_directories.load_template_source',
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
'dbtemplates.loader.Loader',
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ if not settings.configured:
|
|||
'dbtemplates',
|
||||
],
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.load_template_source',
|
||||
'django.template.loaders.app_directories.load_template_source',
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
'dbtemplates.loader.Loader',
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue