Cleaned up the django.template namespace.

Since this package is going to hold both the implementation of the Django
Template Language and the infrastructure for Multiple Template Engines,
it should be untied from the DTL as much as possible within our
backwards-compatibility policy.

Only public APIs (i.e. APIs mentioned in the documentation) were left.
This commit is contained in:
Aymeric Augustin 2014-11-10 21:40:26 +01:00
parent bfa21ddf76
commit 7eefdbf7ab
11 changed files with 99 additions and 100 deletions

View file

@ -8,7 +8,8 @@ import unittest
from django import template
from django.contrib.auth.models import Group
from django.core import urlresolvers
from django.template import loader, Context, RequestContext, Template, TemplateSyntaxError
from django.template import (base as template_base, loader,
Context, RequestContext, Template, TemplateSyntaxError)
from django.template.engine import Engine
from django.template.loaders import app_directories, filesystem
from django.test import RequestFactory, SimpleTestCase
@ -245,7 +246,7 @@ class TemplateRegressionTests(SimpleTestCase):
def test_token_smart_split(self):
# Regression test for #7027
token = template.Token(template.TOKEN_BLOCK, 'sometag _("Page not found") value|yesno:_("yes,no")')
token = template_base.Token(template_base.TOKEN_BLOCK, 'sometag _("Page not found") value|yesno:_("yes,no")')
split = token.split_contents()
self.assertEqual(split, ["sometag", '_("Page not found")', 'value|yesno:_("yes,no")'])