Commit 5d6340ba authored by Lennart Regebro's avatar Lennart Regebro

A quick and dirty fix for the macro problem, that may or may not work.

parent c5db98e7
...@@ -260,6 +260,9 @@ class Context: ...@@ -260,6 +260,9 @@ class Context:
default=default, default=default,
target_language=target_language) target_language=target_language)
def getValue(self, name, default=None):
return self.vars.get(name, default)
class TALESTracebackSupplement: class TALESTracebackSupplement:
"""Implementation of ITracebackSupplement""" """Implementation of ITracebackSupplement"""
def __init__(self, context, expression): def __init__(self, context, expression):
......
...@@ -71,7 +71,7 @@ class ZPTMacros(unittest.TestCase): ...@@ -71,7 +71,7 @@ class ZPTMacros(unittest.TestCase):
This is in the slot This is in the slot
</p> </p>
</metal:block> </metal:block>
<tal:block condition="default"> <tal:block condition="nothing">
<div metal:define-macro="themacro"> <div metal:define-macro="themacro">
<h1>This is the header</h1> <h1>This is the header</h1>
<p metal:define-slot="theslot"> <p metal:define-slot="theslot">
...@@ -80,14 +80,12 @@ class ZPTMacros(unittest.TestCase): ...@@ -80,14 +80,12 @@ class ZPTMacros(unittest.TestCase):
</div> </div>
</tal:block> </tal:block>
""" """
self.result = """ self.result = """<div>
<div>
<h1>This is the header</h1> <h1>This is the header</h1>
<p> <p>
This is in the slot This is in the slot
</p> </p>
</div> </div>
""" """
def testMacroExpansion(self): def testMacroExpansion(self):
......
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