In the controller, I define 2 method:
foobar.py:
class foo(self):
c.help_text = 'help'
return render('/index.html')
class bar(self):
return render('/index.html')
index.html:
${c.help_text}
This gives me an error ==> AttributeError: 'ContextObj' object has no attribute 'help_text'
After reading some mako docs, I try:
% if c.help_text is UNDEFINED:
foo
% else:
${c.help_text}
% endif
It also gives me an error. Then in my development.ini, I put:
mako.strict_undefined = false
after
[app:main]
This still give me an error ==> AttributeError: 'ContextObj' object has no attribute 'help_text'