Hard to say without seeing the code. Don't see the connection between this 
and current or using a module.

Anthony

On Saturday, July 2, 2016 at 8:27:02 AM UTC-4, lucas wrote:
>
> hello one and all,
>
> i read the article in the book: 
> http://web2py.com/books/default/chapter/29/4#Sharing-the-global-scope-with-modules-using-the-current-object
>
> and so i added to my db.py model file after the assignment of db and auth:
>
> from gluon import current
> current.db, current.auth = db, auth
>
> and i created a new module called mcp0.py under the modules section and 
> added say the function:
>
> def chkSession(subscribing=False):
>     auth, db, session, request, response = current.auth, current.db, 
> current.session, current.request, current.response
>     tCase, tSheet = db.cases, db.worksheets
>     ...
>     return etc
>
> being sure that "current" is called in the function and not globally to 
> make sure the threads are kept straight.
>
> now this is where it gets strange, when i generate a link like 
> https://domain.com/app/controller/function/30 and click on it, the 
> application returns an error because the argument of 30 changes to None.  
> now if i type the 30 back into the URL, it will return the page ok.  but 
> clicking on the link, which is a correct link, somehow the argument list 
> gets lost between the click and the function maintaining that argument 
> list.  and again, if i manually type it, the 30, the page loads fine.
>
> weird and i don't understand it.  ok, let me know, lucas
>

-- 
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.

Reply via email to