Skip to content

Commit

Permalink
Negligible cleanups to django.template.context
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Dec 22, 2007
1 parent 55ae4e0 commit abffdf5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions django/template/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class ContextPopException(Exception):

class Context(object):
"A stack container for variable context"

def __init__(self, dict_=None, autoescape=True):
dict_ = dict_ or {}
self.dicts = [dict_]
Expand Down Expand Up @@ -78,11 +77,11 @@ def get_standard_processors():
try:
mod = __import__(module, {}, {}, [attr])
except ImportError, e:
raise ImproperlyConfigured, 'Error importing request processor module %s: "%s"' % (module, e)
raise ImproperlyConfigured('Error importing request processor module %s: "%s"' % (module, e))
try:
func = getattr(mod, attr)
except AttributeError:
raise ImproperlyConfigured, 'Module "%s" does not define a "%s" callable request processor' % (module, attr)
raise ImproperlyConfigured('Module "%s" does not define a "%s" callable request processor' % (module, attr))
processors.append(func)
_standard_context_processors = tuple(processors)
return _standard_context_processors
Expand All @@ -102,4 +101,3 @@ def __init__(self, request, dict=None, processors=None):
processors = tuple(processors)
for processor in get_standard_processors() + processors:
self.update(processor(request))

0 comments on commit abffdf5

Please sign in to comment.