mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
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:
parent
bfa21ddf76
commit
7eefdbf7ab
11 changed files with 99 additions and 100 deletions
|
@ -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")'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue