On Friday, September 30, 2011 3:28:23 PM UTC-4, Jonathan Lundell wrote:
>
>
> We discussed a while back formalizing this, perhaps with a current.apps
> dict/Storage predefined (you'd use current.apps.myappname in that case), but
> nobody seemed to have the energy for it.
>
I think there was some
thanks for the wise advice. i've updated to create a namespace in current.
given that it's up to the developer to follow the convention i think it's ok
to make the developer create a storage() or dict() object if they want the
namespaceing.
thanks,
cfh
On Sep 30, 2011, at 12:16 PM, howesc wrote:
> Thanks for the help guys! i knew it was in there hiding
>
> for reference, here is what i did (i'm running on GAE):
>
> in db.py:
> from gluon.globals import current
> db = DAL('gae') # connect to Google BigTable
> curr
Thanks for the help guys! i knew it was in there hiding
for reference, here is what i did (i'm running on GAE):
in db.py:
from gluon.globals import current
db = DAL('gae') # connect to Google BigTable
current.db=db
in my module:
from gluon.globals import current
The good book says:
http://web2py.com/book/default/chapter/04?search=current#Accessing-the-API-from-Python-modules
http://groups.google.com/group/web2py/browse_thread/thread/b254eae320294f2f/975926ef07c06db4?lnk=gst&q=solution#975926ef07c06db4
On Sep 29, 11:56 pm, apple wrote:
> I also want to know the answer to this. I have followed an example but
> could not get it to work.
>
> In model I have:
>
> from glo
On Sep 29, 11:56 pm, apple wrote:
> I also want to know the answer to this. I have followed an example but
> could not get it to work.
>
> In model I have:
>
> from globals import current
> from gluon.storage import *
> current.app=Storage()
> current.app.db=db
>
> If I put in my module X:
>
I also want to know the answer to this. I have followed an example but
could not get it to work.
In model I have:
from globals import current
from gluon.storage import *
current.app=Storage()
current.app.db=db
If I put in my module X:
from globals import current
then it says "no module named
8 matches
Mail list logo