Commit e336a961 by Chris Jerdonek

Renamed call()'s argument "x" to "val".

parent c602054f
...@@ -2,18 +2,18 @@ import re ...@@ -2,18 +2,18 @@ import re
import cgi import cgi
import inspect import inspect
def call(view, x, template=None): def call(view, val, template=None):
if callable(x): if callable(val):
(args, _, _, _) = inspect.getargspec(x) (args, _, _, _) = inspect.getargspec(val)
if len(args) is 0: if len(args) is 0:
x = x() val = val()
elif len(args) is 1 and args[0] == 'self': elif len(args) is 1 and args[0] == 'self':
x = x(view) val = val(view)
elif len(args) is 1: elif len(args) is 1:
x = x(template) val = val(template)
else: else:
x = x(view, template) val = val(view, template)
return unicode(x) return unicode(val)
def parse(template, view, delims=('{{', '}}')): def parse(template, view, delims=('{{', '}}')):
tmpl = Template(template) tmpl = Template(template)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment