[web2py] Re: the SQLFORM form inserting a record - how to access the new record's id??

2019-05-30 Thread Dave S
On Thursday, May 30, 2019 at 1:45:14 PM UTC-7, Vlad wrote: > > Oops, just found an answer here by Anthony from 8 years ago about > form.vars.id :) > Thank you, Anthony! Thumbs up -- that you found the answer, and also because I'm often appreciating Anthony's efforts. /dps -- Resources: -

[web2py] the SQLFORM form inserting a record - how to access the new record's id??

2019-05-30 Thread Vlad
Oops, just found an answer here by Anthony from 8 years ago about form.vars.id :) Thank you, Anthony! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- Yo

[web2py] Re: web2py belongs if none

2019-05-30 Thread Val K
why not just: # start to form query: q = db.counters.c_date >= datum_od if ...: # continue to form the query depending on conditions q &=...belongs(...) # the same with `left` left = ... if ...: left.append(...) # and fields if ...: fields = [...] else: fields = [...] # at the end

[web2py] the SQLFORM form inserting a record - how to access the new record's id??

2019-05-30 Thread Vlad
form = SQLFORM(db.person) if form.process().accepted: ... How can I access the id of the record inserted into the db by the form? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] web2py belongs if none

2019-05-30 Thread Yebach
Hello I have a query where the possibility for belongs can be a set of values or it can be empty. In case the set is empty I want the query to act as 1=1 and not 1=0, so all values would be selected. Any suggestions?? Thank you This is my query selected = list(selected_values_str.split(",")

Re: [web2py] Re: CSV Dowload

2019-05-30 Thread Kim Cuc
Thanks so much. On Thu, May 30, 2019 at 2:43 AM Quang Lam wrote: > Hi Steve, the code mentioned in the book is only for export to CVS file. > my situation is to download the CVS file stored in the table > > On Wed, May 29, 2019 at 12:01 PM 黄祥 wrote: > >> ref: >> >> http://web2py.com/books/defau

[web2py] Re: Web3py

2019-05-30 Thread 黄祥
just clarficiation, is it correct or it should be python3 setup.py sdist *web3py/Makefile* deploy: test python setup.py sdist *web3py/setup.py* install_requires=[ ... ], is not same like *web3py/requirements.txt* perhaps can create a reference that install_requires in web3py/setup.py is refer

[web2py] Re: Web3py

2019-05-30 Thread 黄祥
*Dockerfile* # please change : # password.txt with your desire filename # password_admin with your desire password admin # 8000 with your available port FROM ubuntu:latest RUN apt update && \ apt install -y git python3-pip python-pip memcached && \ service memcached restart RUN groupadd -r web

[web2py] Re: Web3py

2019-05-30 Thread 黄祥
*suggestion for apps/_scaffold:* *- form validation not work during login and register* ** during register : * form field password and password (again) allow mismatched input (this case happen just in web form field, not in database table, when insert mismatch database table remain empty) ** duri

[web2py] python 3 / web2py 2.18.5 - Sequence of bytes expected error

2019-05-30 Thread Sundar
When I try to run the above version under Apache (2.4), welcome app screen comes. When I click on 'Admin' button, an error message is displayed. Apache log shows the error as TypeError: sequence of byte string values expected, value of type str found\r, referer: http://localhost:85/welcome/defa

[web2py] Re: How can I generate hash for user password like web2py

2019-05-30 Thread Константин Комков
As I understand entrant came on foot and take to operator personal data. After that I know entrants email and can generate link for it. Yes? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2