I have this in a template:
{{if response.menu:}}
<div id="menubar"><!-- for navbar style="position:absolute;
left:245px" -->
<!-- <div id="navbar">{{=user_bar()}}</div> -->
<div id="navbar">{{='auth' in globals() and
auth.navbar(action='user',separators=(' ',' | ',''))}}</div>
<div id="menu">{{is_mobile=request.user_agent().is_mobile}}
{{=MENU(response.menu, _class='mobile-menu' if is_mobile else
'sf-menu',mobile=is_mobile)}}</div>
<!-- for menu: -->
</div>
{{pass}}
This generates the following error:
<type 'exceptions.NameError'> name 'user_bar' is not definedVERSIONweb2py™(2,
2, 1, datetime.datetime(2012, 10, 21, 16, 57, 4), 'stable')PythonPython
2.5.2: C:\hp\bin\Python\python.exeTRACEBACK
1.
2.
3.
4.
5.
6.
Traceback (most recent call last):
File "C:\Users\Lewisl\Dropbox\web2py\gluon\restricted.py", line 212, in
restricted
exec ccode in environment
File
"C:\Users\Lewisl\Dropbox\web2py\applications\pyjokes\views\default/joke_basic.html",
line 31, in <module>
NameError: name 'user_bar' is not defined
ERROR SNAPSHOT [image: help]
<type 'exceptions.NameError'>(name 'user_bar' is not defined)
When I remove the offending comment, the view works properly. Seems like a
bug. Note that sublime text2 shows highlights the comment consistently wiht
all other html comments.
--