please spend some time read web2py book.
ref:
http://web2py.com/books/default/chapter/29/04/the-core#Dispatching
http://web2py.com/books/default/chapter/29/04/the-core#request
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web
Thank You!
That did it... I was missing current in *models/db.py.*
Now the only problem to solve is that I can not get* URL()* in Module
*images.py* to point to *http://127.0.0.1:8000/images/*
When I view *http://127.0.0.1:8000/articles/edit/2* which includes module
*images.py, *
URL("images/sh
yes, you are right, thank you so much for the additional information,
anthony.
*models/db.py*
from gluon import current
current.db = db
current.auth = auth
current.mail = mail
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/w
Note, you don't need to add session, response, or T (or request or cache)
to current, as they are already added automatically by web2py.
Anthony
On Monday, June 30, 2014 8:40:50 AM UTC-4, 黄祥 wrote:
>
> had you already define the current in the models?
>
> e.g.
> *models/db.py*
>
> from gluon imp
had you already define the current in the models?
e.g.
*models/db.py*
from gluon import current
current.db = db
current.auth = auth
current.mail = mail
current.session = session
current.response = response
current.T = T
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com
On Sunday, June 29, 2014 6:54:15 AM UTC-7, 黄祥 wrote:
>
> please use current.db on your module
>
> ref:
>
> http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules
>
> best regards,
> stifan
>
I updated module *images.py* to read:
from gluon import *
def t
please use current.db on your module
ref:
http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.g
7 matches
Mail list logo