in models - 0.py or menu.py I declare:
CONST1 = 1
conts2 = 2
in controller I use this constatns - all work, BUT if I call an ajax
function:
onclick='''
//$(this).css('z-index','0');
$('#tag%s').hide('fast');
$('#cvr%s').css('display','block'); //
.css('z-index','10');
ajax('%s',['vol','acc','dealer'], 'tag%s');
''' % (id, id, URL('get', args=[id]), id)
in same controller in function get:
def get():
print const2 ## success!
print CONST1 ## <<<<<<--- ERROR!
WHY?
constants in upper case raise error!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.