summaryrefslogtreecommitdiff
path: root/django/template/__init__.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-08-27 18:10:32 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-08-27 18:10:32 +0000
commit2c2653db9fe3afdd73495ae90930898c589f4869 (patch)
tree609fa4aa090a106c47120298da3350ff0bdb94c4 /django/template/__init__.py
parent97b9ad73b4889ffebb3da2239b472bbfd1600177 (diff)
Reverted [3659], the 'name' field on Template objects and the signal emitted whenever a template is rendered. Refs #2333.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/template/__init__.py')
-rw-r--r--django/template/__init__.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py
index 2f68924d18..ba7ca4c02b 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -60,8 +60,6 @@ from django.conf import settings
from django.template.context import Context, RequestContext, ContextPopException
from django.utils.functional import curry
from django.utils.text import smart_split
-from django.dispatch import dispatcher
-from django.template import signals
__all__ = ('Template', 'Context', 'RequestContext', 'compile_string')
@@ -139,14 +137,13 @@ class StringOrigin(Origin):
return self.source
class Template(object):
- def __init__(self, template_string, origin=None, name='<Unknown Template>'):
+ def __init__(self, template_string, origin=None):
"Compilation stage"
if settings.TEMPLATE_DEBUG and origin == None:
origin = StringOrigin(template_string)
# Could do some crazy stack-frame stuff to record where this string
# came from...
self.nodelist = compile_string(template_string, origin)
- self.name = name
def __iter__(self):
for node in self.nodelist:
@@ -155,7 +152,6 @@ class Template(object):
def render(self, context):
"Display stage -- can be called many times"
- dispatcher.send(signal=signals.template_rendered, sender=self, template=self, context=context)
return self.nodelist.render(context)
def compile_string(template_string, origin):