I've just started playing with Pylons. I've been working my way
through the examples in http://pylonsbook.com/en/1.1/using-view-templates.html
and decided to try out strict mode.
I intentionally created a template which had an undefined variable.
[...]
<p>Hello ${c.name}${c.xxx}!</p>
[...]
and rendered it with this controller code:
class GreetingController(BaseController):
def index(self):
c.name = 'Pylons Developer'
return render('/greeting.html')
I was expecting to have c.xxx turn into an empty string, and then the
plan was to turn on strict mode and see if I got an AttributeError.
Surprisingly, *before* I turned on strict mode, I got the
AttributeError
AttributeError: 'ContextObj' object has no attribute 'xxx'
(http://pylonshq.com/tracebacks/f7d8cebed15956c453550f12812c3f4d).
It's as if strict mode were already turned on. Am I just confused
about how this is all supposed to work?
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.