Re: [web2py] web2py with python3

2018-06-12 Thread 黄祥
pls use web2py source version, and if you use conda, perhaps this thread discussion can help ref: https://groups.google.com/forum/#!topic/web2py/unamesXfBs4 best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: LDAP Authentication never work

2018-06-12 Thread 黄祥
perhaps you can check the log, to understand what exactly happens in the process best regards, stifan -- 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

Re: [web2py] Re: LDAP Authentication never work

2018-06-12 Thread Suhas Jadhav
Hi Stifan, Any solution for me? Thanks, Suhas On Sun, Jun 10, 2018 at 10:47 PM Suhas Jadhav wrote: > Hi stifan, > > Thanks for reply. But it is still validating against the DB and not LDAP > > Thanks, > Suhas > > On Friday, 8 June 2018 16:39:15 UTC-7, 黄祥 wrote: >> >> pls try (not tested) >> *

[web2py] optimizing db queries

2018-06-12 Thread Vladimir Makarov
Hi there! I have a few tables: db.trucks(id, num ...) db.operations (id, truck_id ...) db.controls (id, operation_id ...) There is one to many relation: unique db.trucks.num corresponds to many operations and the only db.operations.id corresponds to many controls. I can do search a

Re: [web2py] web2py with python3

2018-06-12 Thread Richard Vézina
That's what I thought... I see others give you tip, I think there few things I can had good luck Richard On Tue, Jun 12, 2018 at 2:45 PM, yifan li wrote: > Hi Richard, > > Thank you for your reply. I'm using a window8 OS. My web2py version is > 2.16.1 which is the latest version. After I downlo

Re: [web2py] web2py with python3

2018-06-12 Thread Anthony
> > Thank you for your reply. I'm using a window8 OS. My web2py version is > 2.16.1 which is the latest version. After I download the zip file, I just > execute 'web2py.exe' in terminal. There is no file called 'web2py.py' so > that I'm not allowed to use 'python3 web2py.py' to run this booste

Re: [web2py] web2py with python3

2018-06-12 Thread Marcelo Huerta
You should probably download the source version and follow the indications in http://www.web2py.com/books/default/chapter/29/03/overview#Startup about the source distribution. That way you invoke web2py.py with whatever version of Python you want to use. -- Resources: - http://web2py.com - htt

Re: [web2py] web2py with python3

2018-06-12 Thread yifan li
Hi Richard, Thank you for your reply. I'm using a window8 OS. My web2py version is 2.16.1 which is the latest version. After I download the zip file, I just execute 'web2py.exe' in terminal. There is no file called 'web2py.py' so that I'm not allowed to use 'python3 web2py.py' to run this boos

[web2py] Re: I have a file 'you.html' in static, how do I open it in my web2py app?

2018-06-12 Thread Anthony
> > views index.html > {{=redirect(URL('static','pages/landingpage/index.html'))}} > Note, that would not insert the contents of the static page into the view but simply redirect to the URL of the static page. If that is what you want, this would not be the most efficient or straighforward way

Re: [web2py] Re: Improve HTML page load

2018-06-12 Thread Anthony
On Monday, June 11, 2018 at 10:58:01 PM UTC-4, Maurice Waka wrote: > > Selecting the last item in q or a ends up with: > > That is the Python representation of an entire Row object. Probably you want to get just a single field from within it. Anthony -- Resources: - http://web2py.com - http:/

[web2py] Re: "unarchive" a record?

2018-06-12 Thread Anthony
> > current.update_record(name=version.name, description=version.description) > > And note, if you have a lot of fields to update, the above can be simplified to: current.update_record(**db.record._filter_fields(version)) Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Doc

[web2py] Re: "unarchive" a record?

2018-06-12 Thread Anthony
> > But, if I now want to reverse the process, i.e. make the record current, > what do I need to do (and leave the db in a state where, if I later > re-archive that record, things are consistent? ) > - Only set "is_active" to true? > Yes, I think that should do it (note, when you do that, it

Re: [web2py] web2py with python3

2018-06-12 Thread Richard Vézina
You update python in your system not web2py... What is your environement windows|linux|mac? I guess since you use Anaconda you are under windows or mac... web2py been ported to python 3.4+, but I am not sure it could be considered production ready under python 3. I am not following progress careful

[web2py] web2py with python3

2018-06-12 Thread yifan li
Hi everyone, I install latest version for web2py. But the python version in web2py is 2.7.9. However, I executed web2py in anaconda. My anaconda has python version 3.6 installed. How could I upgrade python version to 3.6 in web2py. Best regards, Yifan -- Resources: - http://web2py.com - http

[web2py] Re: pre-populating SQLFORM

2018-06-12 Thread Leonel Câmara
You can, before SQLFORM, do: db.person.name.default = 'value you want to prepopulate' Note that it will come pre-populated with the values on the record without you doing anything. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou

[web2py] Re: "unarchive" a record?

2018-06-12 Thread Leonel Câmara
Say you have a table named "record" with a name and a description field and you want to revert to the version with record_archive ID given in request.args(0) version = db.record_archive[request.args(0)] current = db.record[version.current_record] current.update_record(name=version.name, descrip