<%! import myapp.utils %> <% bar = myapp.utils.Sequence() %>
File "/tmp/myapp/templates/bar.html.py", line 19, in render_body bar = myapp.utils.Sequence() AttributeError: 'Undefined' object has no attribute 'utils'
looking into the compiled template:
def render_body(context,pageargs): locals = dict(pageargs=pageargs) myapp = context.get('myapp', UNDEFINED) bar = myapp.utils.Sequence() locals.update(dict([(k, locals()[k]) for k in ['bar'] if k in locals()])) return ''
myapp = context.get('myapp', UNDEFINED)
should not be there...
(can be worked over with the "from something import object, anotherobject" form, and sometimes "import myapp" then "import myapp.utils" solved this yesterday, but now i can't reproduce that=:)