Hi Massimo thank you for you help!
What I was trying to do using crud.update initially was have a user update
one of their records. When they do this I would like to set a boolean value
that is in db.listing named 'confirmed' to False (confirmed=False) which is
readable=False and writable=False
I
the syntax for SQLFORM is:
SQLFORM(table, record or record_id)
In your first example you were passing a query instead of a record. Now you
are passing db.listing[query] . But in this context query should be a
record_id instead you are passing
db.listing[listing_id] and db.listing.userinfo[au
This is not valid dal syntax. Can you explain what is the supposed to do?
On Sunday, 10 March 2013 19:00:45 UTC-5, Andrew Evans wrote:
>
> I am now getting this error
>
> AttributeError: 'Table' object has no attribute
> 'SUBSTRING(listing.userinfo,5,(6 - 5))'
>
>
> Using this code
>
> listi
I am now getting this error
AttributeError: 'Table' object has no attribute
'SUBSTRING(listing.userinfo,5,(6 - 5))'
Using this code
listing_id = request.args(0)
query = db.listing[listing_id] and db.listing.userinfo[auth.user.id]
query = db.listing[query]
form = SQLFORM(db.listi
Ok so after doing a bit more research
I have come across this:
http://www.web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml.SQLFORM-class.html
and I have done this
listing_id = request.args(0)
query = (db.listing.id[listing_id]) & (db.listing.userinfo[auth.user.id])
form = SQL
Hello I am probably going about this wrong.
But I am wondering if it is possible to do something like this with SQLFORM
so I can pass on successful submission an update saying confirmed = False
@auth.requires_login()
def edit_listing():
listing_id = request.args(0)
query = db((db.listin
6 matches
Mail list logo