Commit a6dfe036 by Chris Wanstrath

check the context before hitting a view method

parent 06c5544e
......@@ -36,7 +36,9 @@ class View(object):
return self.__class__.__name__
def get(self, attr, default):
if hasattr(self, attr):
if attr in self.context:
return self.context[attr]
elif hasattr(self, attr):
return getattr(self, attr)()
else:
return default
......
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