[web2py] Validator IS_NOT_IN_DB not working | web2py

2019-10-18 Thread Jay B
Hello guys, I'm struggling with a problem that's driving me crazy. The validator IS_NOT_IN_DB which I use for my object "tag" does not work for me. # TAG db.define_table('tag', Field('name', requires=(IS_SLUG(), IS_LOWER(), IS_NOT_IN_DB( db, 'tag.name'))), Field(

[web2py] Re: Setting a pre-authenticated user (no password in auth db) as "logged in" for web2py app

2019-10-18 Thread Davidiam
Thank you for your reply. It looks to me that that method should do the trick. I will try it out today and give an update afterward. Kind Regards, David On Thursday, October 17, 2019 at 4:59:54 PM UTC+2, Ruslan Gareev wrote: > > Hi, i think that a "login_user" method in AuthApi meets your req

[web2py] Re: Validator IS_NOT_IN_DB not working | web2py

2019-10-18 Thread 'Annet' via web2py-users
What about form = SQLFORM() if form.process(...).accepted instead of form = SQLFORM().process() if form.accepted: Best, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

[web2py] Re: Validator IS_NOT_IN_DB not working | web2py

2019-10-18 Thread Jay B
Wow, that's actually how it works! Thank you very much! Am Freitag, 18. Oktober 2019 12:32:17 UTC+2 schrieb Annet: > > What about > > > form = SQLFORM() > if form.process(...).accepted > > > > instead of > > form = SQLFORM().process() > if form.accepted: > > > Best, > Annet > -- Resources: - htt

[web2py] Re: Setting a pre-authenticated user (no password in auth db) as "logged in" for web2py app

2019-10-18 Thread Davidiam
Hello Ruslan, I tried to use the "authapi.login_user" method but it looks to me like the login_bare method works better and requires less coding to make it work. I currently have added the login code to the "user" method in the "default.py". When I used the "authapi.login_user" method, it log

[web2py] Re: I want to delete the file created as a result of an upload field.

2019-10-18 Thread 'jim kaubisch' via web2py-users
Thanks, Dave. Your suggestion made the answer click for me. Embarrassingly, for some reason I got it in my head that both the upload directory and the upload file name were located in the db record for a given item :-( Once it clicked that the directory comes from the schema and only the filena

Re: [web2py] Re: web2py survey dynamic forms with nested choices

2019-10-18 Thread NGNZONE
Hello Ramos, your solution means that I will have to get this survey always online, but this app will at some point run offline for local users. So google forms might not be very fitting in this context. On Thursday, October 17, 2019 at 11:16:46 AM UTC+1, Ramos wrote: > > apart from that you can

Re: [web2py] Re: Web2py binaries

2019-10-18 Thread OogieM
> > > The solution is quite simple: download them from another OS (Windows or > Linux) and then use an USB key / drive in order to copy them to the Mac ... > In this way the program works like a charm > Any suggestions for those of us with no access to any computer with any other operating sys

Re: [web2py] Beginner can't get past install

2019-10-18 Thread Oogie McGuire
> On Oct 13, 2019, at 10:47 AM, Nico Zanferrari wrote: > > Hi, > > this is quite strange > > • have you tried both versions (web2py_osx.2_18_5.py2.zip and > web2py_osx.2_18_5.py3.zip)? > • can you try to open their content (with CTRL on the folder) and the > run the embedde

[web2py] Re: Open form's view on a modal

2019-10-18 Thread Cristina Sig
Thanks for your explanation, I'm a newbie on web2py so I have some doubts. Do you set your modal and script that calls that modal on the main page? or do you call it from a different view page? I'm a little bit confused El miércoles, 16 de octubre de 2019, 18:39:41 (UTC-3), Cristina Sig escribi

[web2py] Re: web2py survey dynamic forms with nested choices

2019-10-18 Thread Val K
'list:string' are definitely RDBMS-anti-pattern: try to count users that checked A-answer to B-question from B-section from C-survey and `you`ll see your problems multiplied`(c). If 'list:string' seems suitable then you don't need RDBMS at all, you would better use pickle or json or another s

[web2py] Re: problems running PY4WEB

2019-10-18 Thread lu ond
Dear Massimo, I tried to install py4web in windows 10, but a got an NotImplementedError when entered py4web-start apps and the page was not available. The full stack trace was as follows. Did I made some mistake? Microsoft Windows [versão 10.0.18362.418] (c) 2019 Microsoft Corporation. Todos os

[web2py] Is it possible to change the auto-generated key used to cache an specific URL?

2019-10-18 Thread Lisandro
When using @cache.action in controller functions, the key used for storing the content is auto-generated based on the request URL. To be more specific, the key is generated based in *current.request.env.path_info* and *current.response.view:* https://github.com/web2py/web2py/blob/1ce316609a7a70c

[web2py] Re: Open form's view on a modal

2019-10-18 Thread lu ond
Dear Cristina, I make the modal in the main page and use components (LOAD()) to submit the forms. This way, each form shall have its own controller function (for instance, your_form) and view ('your_form.load'). The javascripts are inserted by the form functions (the component). I use response.j

Re: [web2py] Re: web2py survey dynamic forms with nested choices

2019-10-18 Thread ngn zone
The truth is I need some light on which direction to take. as you have said, I need RDBMS, but talking of json or pickle I will need some help on how to go about it. Any link to a tutorial or example? Thanks Val On Fri, Oct 18, 2019 at 11:19 PM Val K wrote: > 'list:string' are definitely RDBMS-