mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-05-15 11:03:14 +00:00
Merge branch 'release/0.7.4'
This commit is contained in:
commit
cdb7787022
4 changed files with 23 additions and 15 deletions
|
|
@ -1 +1 @@
|
|||
__version__ = "0.7.3"
|
||||
__version__ = "0.7.4"
|
||||
|
|
|
|||
|
|
@ -29,22 +29,25 @@ class DbTemplatesTestCase(TestCase):
|
|||
|
||||
def test_load_templates(self):
|
||||
self.test_basiscs()
|
||||
original_template_source_loaders = loader.template_source_loaders
|
||||
loader.template_source_loaders = [load_template_source]
|
||||
result1 = loader.get_template("base.html").render(Context({'title':'MainPage'}))
|
||||
self.assertEqual(result1, u'<html><head></head><body>Welcome at MainPage</body></html>')
|
||||
|
||||
result2 = loader.get_template("sub.html").render(Context({'title':'SubPage'}))
|
||||
self.assertEqual(result2, u'<html><head></head><body>This is SubPage</body></html>')
|
||||
|
||||
if VERSION[:2] >= (1, 2):
|
||||
from dbtemplates.loader import Loader
|
||||
dbloader = Loader()
|
||||
loader.template_source_loaders = [dbloader.load_template_source]
|
||||
result = loader.get_template("base.html").render(Context({'title':'MainPage'}))
|
||||
self.assertEqual(result, u'<html><head></head><body>Welcome at MainPage</body></html>')
|
||||
try:
|
||||
result1 = loader.get_template("base.html").render(Context({'title':'MainPage'}))
|
||||
self.assertEqual(result1, u'<html><head></head><body>Welcome at MainPage</body></html>')
|
||||
result2 = loader.get_template("sub.html").render(Context({'title':'SubPage'}))
|
||||
self.assertEqual(result2, u'<html><head></head><body>This is SubPage</body></html>')
|
||||
|
||||
if VERSION[:2] >= (1, 2):
|
||||
from dbtemplates.loader import Loader
|
||||
dbloader = Loader()
|
||||
loader.template_source_loaders = [dbloader.load_template_source]
|
||||
result = loader.get_template("base.html").render(Context({'title':'MainPage'}))
|
||||
self.assertEqual(result, u'<html><head></head><body>Welcome at MainPage</body></html>')
|
||||
result2 = loader.get_template("sub.html").render(Context({'title':'SubPage'}))
|
||||
self.assertEqual(result2, u'<html><head></head><body>This is SubPage</body></html>')
|
||||
finally:
|
||||
loader.template_source_loaders = original_template_source_loaders
|
||||
|
||||
def test_error_templates_creation(self):
|
||||
call_command('create_error_templates', force=True, verbosity=0)
|
||||
self.assertEqual(list(Template.objects.filter(sites=self.site1)),
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ copyright = u'2010, Jannis Leidel'
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.7.3'
|
||||
version = '0.7.4'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.7.3'
|
||||
release = '0.7.4'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
|||
|
|
@ -295,6 +295,11 @@ Admin actions
|
|||
Changelog
|
||||
=========
|
||||
|
||||
0.7.4 (09-23-10)
|
||||
----------------
|
||||
|
||||
* Fixed tests.
|
||||
|
||||
0.7.3 (09-21-10)
|
||||
----------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue