[web2py] Re: response.menu links alt attribute and target="blank"

2018-08-20 Thread lyn2py
Hello, I am using the latest pulled version from GitHub and I am not able to use either of the solution listed by Anthony Version 2.17.1-stable+timestamp.2018.08.05.17.57.00 Solution 1: ('Label', False, dict(_href=URL(...), _target='blank')) gave this link: http: //127.0.0.1:8000/app/ctrl/ind

[web2py] Re: multiple controllers with one view

2018-08-20 Thread lyn2py
To choose which view, put response.view="view.html" in the 2 controllers that share the same view. And you need to return the same variables used for the view in both controllers. On Monday, August 20, 2018 at 4:44:29 AM UTC+8, lbjc...@gmail.com wrote: > > I have two controllers in an app.

[web2py] How to stop page load or function if it exceeds a time limit?

2018-08-20 Thread William
I understand web2py discourages the use of multiprocessing. Are there any other methods where we can break a function after running for a specific time limit? Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

[web2py] Re: multiple controllers with one view

2018-08-20 Thread Anthony
> > def conversations(): > row = db(db.post.author== auth.user.id).select(db.post.id, db.post. > convo, orderby=~db.post.id, limitby=(0,1)).first() > id = row.convo if row else None > return dict(id=id) > > > with the view.html > {{=conversations()}} > > You must either include "conver

[web2py] access id of newly inserted text

2018-08-20 Thread lbjc1978
I am using javascript to insert to database and it works well with jQuery('#myform').submit(function() { ajax('{{=URL('my_search_party')}}', ['message'], 'target'); return false; }); Controller code: def my_search_party(): form = S

[web2py] Re: response.menu links alt attribute and target="blank"

2018-08-20 Thread Anthony
Are you using the default layout.html in the welcome app? If so, it no longer uses the MENU() helper, so the solutions you reference do not work. Instead, you will have to edit the code in layout.html to do what you want. Anthony On Monday, August 20, 2018 at 4:46:22 AM UTC-4, lyn2py wrote: > >

[web2py] Re: changing %(link)s

2018-08-20 Thread Anthony
Just hard code it: auth.messages.verify_email = 'Click on the link https://yourdomain.com/user/verify_email to verify your email' Anthony On Sunday, August 19, 2018 at 10:30:07 PM UTC-4, Gualter Portella wrote: > > Hi, > > Can anybody provide me with specfic directions on how to do the followin

Re: [web2py] Re: multiple controllers with one view

2018-08-20 Thread Lovedie JC
Thanks. This is good On Mon, 20 Aug 2018, 15:16 Anthony wrote: > def conversations(): >> row = db(db.post.author== auth.user.id).select(db.post.id, db.post. >> convo, orderby=~db.post.id, limitby=(0,1)).first() >> id = row.convo if row else None >> return dict(id=id) >> >> >> with th

[web2py] Re: access id of newly inserted text

2018-08-20 Thread Anthony
Is the problem that you are not getting the id of the latest insert, or that you are getting the correct record, but no message is being inserted? Also, no reason to use if/else in the controller if you are simply going to call "pass" in each case. Just call SQLFORM(...).accepts(), or better yet

Re: [web2py] Re: access id of newly inserted text

2018-08-20 Thread Lovedie JC
Message inserted but id is blank On Mon, 20 Aug 2018, 15:45 Anthony wrote: > Is the problem that you are not getting the id of the latest insert, or > that you are getting the correct record, but no message is being inserted? > > Also, no reason to use if/else in the controller if you are simply

Re: [web2py] Re: access id of newly inserted text

2018-08-20 Thread Anthony
On Monday, August 20, 2018 at 8:47:17 AM UTC-4, Lovedie JC wrote: > > Message inserted but id is blank > It's not possible for the id to be blank. Are you saying: id = row.id throws an exception? How are you determining that "id is blank"? Anthony -- Resources: - http://web2py.com - http://w

Re: [web2py] Re: changing %(link)s

2018-08-20 Thread Gualter Portella
Thanks, Anthony! And what about the auth.messages.reset_password? It needs the hashcode to redirect to the specfic user, right? Any ideas. Once again thanks, Cheers 2018-08-20 9:36 GMT-03:00 Anthony : > Just hard code it: > > auth.messages.verify_email = 'Click on the link > https://yourdomai

Re: [web2py] Re: access id of newly inserted text

2018-08-20 Thread Lovedie JC
Actually, I just discovered the problem. I wasn't posting to the correct DIV in html, hence appearing as a blank message. I tried to render it into view.html and saw the error. Now my next challenge is to fix it into the bubble. See attached. On Mon, 20 Aug 2018 at 16:51, Anthony wrote: > On Mon

Re: [web2py] Re: changing %(link)s

2018-08-20 Thread Anthony
It also has a "key" key available, so you can do: auth.messages.reset_password = 'Click on the link https://yourdomain.com/user/reset_password?key=%(key)s to reset your password' Anthony On Monday, August 20, 2018 at 11:12:29 AM UTC-4, Gualter Portella wrote: > > Thanks, Anthony! > > And what

Re: [web2py] Re: changing %(link)s

2018-08-20 Thread Gualter Portella
Great, Anthony! You are a legend! Thanks 2018-08-20 12:55 GMT-03:00 Anthony : > It also has a "key" key available, so you can do: > > auth.messages.reset_password = 'Click on the link > https://yourdomain.com/user/reset_password?key=%(key)s to reset your > password' > > Anthony > > On Monday, A

[web2py] Re: web2py 2.17.1

2018-08-20 Thread Bob St John
I just downloaded 2.17.1 and it works great... thankyou! However I am a bit confused with the pyDAL that came with it... _version_ = 17.11 Same version 17.11 when I downloaded pyDAL using pip Is this the latest pyDAL 18.08 only without the _version_ number updated? On Sunday, August 5, 2018 at

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-20 Thread Rodrigo Gomes
some one help me pleas quinta-feira, 16 de Agosto de 2018 às 20:39:35 UTC-3, Rodrigo Gomes escreveu: > > > Good evening, folks, I've come here to unveil a mystery, I'm developing an > application with web2py, (framework that I use about 3 years ago) > > I am using sqlform.factory, passing 2

Re: [web2py] Re: DAL MySQL text type

2018-08-20 Thread Carlos Cesar Caballero Díaz
Thanks Anthony, LONGTEXT is exactly what I need. But in case of necessity, how "experimental" is that feature? Should I be worried about unnoticed API changes?. Greetings. El 18/08/18 a las 17:48, Anthony escribió: The DAL uses LONGTEXT for text fields in MySQL. If you'd like to use an alter

Re: [web2py] Re: DAL MySQL text type

2018-08-20 Thread Anthony
On Monday, August 20, 2018 at 2:41:22 PM UTC-4, Carlos Cesar Caballero wrote: > > Thanks Anthony, LONGTEXT is exactly what I need. But in case of necessity, > how "experimental" is that feature? Should I be worried about unnoticed API > changes?. > It's not really experimental (been there for y