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
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
I have a controller *articles.py*.
@auth.requires_login()
def edit():
art_id=request.args(0)
art=db.art_articles[art_id] or redirect(error_page)
form=crud.update(db.art_articles,art,next='view/[id]')
import images
thumbs=images.thumbs()
return dict(form=form, art
Getting error on start-up of fresh install on Fused.com hosting service
account :
Traceback (most recent call last):
File "web2py.py", line 18, in ?
import gluon.widget
File "/home/iaff106/web2py/gluon/__init__.py", line 15, in ?
from globals import current
File "/home/iaff106/web2p
How can I get a row from a DAL object if I know the associated id.
Example:
my_phones=db((db.prof_phone.pid==person_id)&(db.prof_phone.provider>1)).
select(db.prof_phone.ALL,db.provider.edomain,
left=db.provider.on(db.provider.id==db.prof_phone.provider),orderby=
db.prof_phone.label)
Whic
I have a left join query:
phones=db((db.prof_phone.pid==person_id)&(db.prof_phone.provider>1)).select(db.prof_phone.ALL,db.provider.edomain,
left=db.provider.on(db.provider.id==db.prof_phone.provider),orderby=db.prof_phone.label)
which gives me an object:
phones:prof_phone.id prof_ph
How do I do :
"SELECT * FROM table WHERE field IN (1,2,3,4,7) AND field2='3'""
AND / OR
"DELETE FROM table WHERE field1 IN (1,2,3,4,7) AND field2='3'"
in web2py DAL?
I come from PHP and I am really struggling with DAL in web2py.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Doc
7 matches
Mail list logo