from gluon.html import DIV
def get_dashboard():
return DIV(
DIV('Lorat ipsum etc', _class='dashboard alert'),
_class='center-box').xml()
def index():
from modelling.dashboard import get_dashboard
dashboard = get_dashboard()
return dict(message=message, dashboard=dashboard)
Hi,
I have this small code in the dashboard module:
from gluon.html import DIV
def get_dashboard():
return DIV(
DIV('Lorat ipsum etc', _class='dashboard alert'),
_class='center-box').xml()
and this one in default.py :
def index():
from modelling.dashboard import get_dashboard
dashboard = get_dashboard()
return dict(message=message, dashboard=dashboard
And I noticed that if I refresh the page to quickly sometimes I have the error :
global name DIV is not defined
or some other, the css is not defined ?
Could anybody figure why ? And how to avoid this ?
Thank you,
--
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 web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So the problem is from .xml() than??Richard
On Mon, Mar 13, 2017 at 6:20 PM, Anthony <abas...@gmail.com> wrote:
No, DIV is in gluon.html.
--
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 web2py+un...@googlegroups.com.
"Other objects and modules are defined in the libraries, but they are not automatically imported since they are not used as often.
The core API entities in the web2py execution environment are request
, response
, session
, cache
, URL
, HTTP
, redirect
and T
and are discussed below."
Then a little further :
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.