[web2py] Re: Reverse Groupby with Join Bug?

2018-08-27 Thread Robert Porter
I'm using GoogleSQL. DAL sometimes seems to have some nuances there compared to MySQL. I think your suggestion will probably work. I was just as confused at the ~ operator working in groupby as you! Thanks! On Monday, 27 August 2018 20:21:22 UTC-7, Anthony wrote: > > WITHOUT the join works p

[web2py] Re: Reverse Groupby with Join Bug?

2018-08-27 Thread Anthony
> > WITHOUT the join works perfectly, giving me the last entry for each item > checked out by this user: > > db(db.checkout.user_id == 1).select(groupby=~db.checkout.item_id) > What database are you using? The ~ operator is for adding "DESC" to an "ORDER BY" clause -- it is not relevant to "GR

[web2py] Reverse Groupby with Join Bug?

2018-08-27 Thread Robert Porter
I'm trying to do a groupby that gets the last entry for each item checked out by a user from db.checkout (i.e. they've checked it out multiple times, but I just want the last entry). I then want to join on db.item. db.checkout: user_id item_id (reference item) db.item: item_name WITHOUT the j

[web2py] Re: Hidden fields in SQLFORMs are one-way?

2018-08-27 Thread Joe Barnhart
Hi Anthony -- My issue was that I wanted to change the value of the hidden field dynamically, i.e. after its value was set in SQLFORM. Nosing around in the code, I did find my ultimate answer. The FORM object holds the hidden attributes in an attribute... called "hidden". I could go edit the

[web2py] Allowing users to delete their profiles

2018-08-27 Thread Donald McClymont
It seems there is a setting: auth.settings.allow_delete_accounts=True This does expose the deletion checkbox which is good - however on submission it generates an error and user not deleted. Is there something else required to make this work or should I open an issue? Donald -- Resou

[web2py] Error processing form with select multiple

2018-08-27 Thread Christian Varas
Hi everyone!, I'm developing a site which have 3 forms in one page, and one of them have multiples selection fields. I'm facing an error when the form is processed and I have not been able to fix it. Error: * string indices must be integers, not str* *locals* *c* : '' *component_list* :

[web2py] Re: Hidden fields in SQLFORMs are one-way?

2018-08-27 Thread Anthony
>From the book: form = SQLFORM(...,hidden=...) causes the hidden fields to be passed with the submission, no more, no less. form.accepts(...) is not intended to read the received hidden fields and move them into form.vars. The reason is security. Hidden fields can be tampered with. So you have