aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mako/codegen.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-12-16 20:40:04 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-12-16 20:40:04 +0000
commit33edbe89ad5fb65821a4b56f1c7d8f99ce94678d (patch)
tree791693be725915e2b241fb65491e6b957a3dabad /lib/mako/codegen.py
parent4d3dbb32855df3458f2e50119f2ae5ddce6c5294 (diff)
downloadexternal_python_mako-33edbe89ad5fb65821a4b56f1c7d8f99ce94678d.tar.gz
external_python_mako-33edbe89ad5fb65821a4b56f1c7d8f99ce94678d.tar.bz2
external_python_mako-33edbe89ad5fb65821a4b56f1c7d8f99ce94678d.zip
ok the default "catchall" at the page level is now **pageargs, useable
by the template but otherwise not affected
Diffstat (limited to 'lib/mako/codegen.py')
-rw-r--r--lib/mako/codegen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mako/codegen.py b/lib/mako/codegen.py
index 0c538cd..7d659bb 100644
--- a/lib/mako/codegen.py
+++ b/lib/mako/codegen.py
@@ -50,10 +50,10 @@ class _GenerateRenderMethod(object):
if pagetag is not None:
args = pagetag.body_decl.get_argument_expressions()
if not pagetag.body_decl.kwargs:
- args += ['**_extra_pageargs']
+ args += ['**pageargs']
cached = eval(pagetag.attributes.get('cached', 'False'))
else:
- args = ['**_extra_pageargs']
+ args = ['**pageargs']
cached = False
buffered = filtered = False
self.compiler.pagetag = pagetag
@@ -140,6 +140,8 @@ class _GenerateRenderMethod(object):
self.printer.writeline("try:")
self.identifier_stack.append(self.compiler.identifiers.branch(self.node))
+ if not self.in_def and '**pageargs' in args:
+ self.identifier_stack[-1].argument_declared.add('pageargs')
if not self.in_def and (len(self.identifiers.locally_assigned) > 0 or len(self.identifiers.argument_declared)>0):
self.printer.writeline("__locals = dict(%s)" % ','.join("%s=%s" % (x, x) for x in self.identifiers.argument_declared))