[web2py] Re: Getting "invalid controller" error after updating routes.py (DigitalOcean setup)

2018-12-27 Thread William
Ok managed to fix this problem by restarting my droplet *facepalm*. Case closed. -- 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) --- You received this

[web2py] @auth.requires_signature() vs @auth.requires_login()

2018-12-27 Thread Vlad
I generally understand how to use both, @auth.requires_signature() and @auth.requires_login(), but from a practical point of view, when in real life would you prefer to use one vs. another? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Getting "invalid controller" error after updating routes.py (DigitalOcean setup)

2018-12-27 Thread William
Hi all, I have successfully deployed Web2py on DigitalOcean following this tutorial . But after updating my routes.py file, I sometimes get the error "*invalid controller*" when I visit pages. This is what I wrote in the routes.py file:

Re: [web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Eliezer (Vlad) Tseytkin
I got it, finally, It was purely mystical for me, but now it makes sense... Grid is quite a sophisticated beast and does some magic behind the stage... Thank you very much! On Thu, Dec 27, 2018 at 11:08 PM Anthony wrote: > This simply displays an old fashioned grid. Nothing fancy. But now >>

Re: [web2py] Re: "... records found' on the default grid

2018-12-27 Thread Eliezer (Vlad) Tseytkin
Thank you! On Thu, Dec 27, 2018, 10:56 PM Anthony https://groups.google.com/d/msg/web2py/9_Lz5VWb80A/SgW26gsP3IcJ > > On Thursday, December 27, 2018 at 7:47:56 PM UTC-5, Vlad wrote: >> >> What would be the best way to get rid of "5 records found" on the upper >> right corner of the default grid

Re: [web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Anthony
> > This simply displays an old fashioned grid. Nothing fancy. But now > consider just exactly same code, with 2 extra lines (if (id==0): > redirect(home) : > > def test(): > id = 0 > try: > id = request.args(0, cast=int) > except: > id = 0 > pass > if

[web2py] Re: "... records found' on the default grid

2018-12-27 Thread Anthony
https://groups.google.com/d/msg/web2py/9_Lz5VWb80A/SgW26gsP3IcJ On Thursday, December 27, 2018 at 7:47:56 PM UTC-5, Vlad wrote: > > What would be the best way to get rid of "5 records found" on the upper > right corner of the default grid view? > -- Resources: - http://web2py.com -

[web2py] "... records found' on the default grid

2018-12-27 Thread Vlad
What would be the best way to get rid of "5 records found" on the upper right corner of the default grid view? -- 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

Re: [web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Eliezer (Vlad) Tseytkin
Antony, thank you very much, I got the 1st and the 3rd ones. But about the 2nd one it's tricky. Without going into details of why I need it, could you please just glance at the following code that works 100%: def test(): id = 0 try: id = request.args(0, cast=int) except:

[web2py] Re: grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Anthony
On Thursday, December 27, 2018 at 4:05:40 PM UTC-5, Vlad wrote: > > Here is a test function in my controller: > > def test(): > id = 0 > try: > id = request.args(0, cast=int) > session.flash = "Here is the id: " + str(id) > except: > session.flash = "ID is not

[web2py] grid reloading the page and outdated flash msgs? (strange behavior...)

2018-12-27 Thread Vlad
Here is a test function in my controller: def test(): id = 0 try: id = request.args(0, cast=int) session.flash = "Here is the id: " + str(id) except: session.flash = "ID is not valid!" pass if id==0: redirect(URL('home')) query =

[web2py] Re: Issue with latin /utf8 ??

2018-12-27 Thread Val K
And make sure that you have in your html -- 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) --- You received this message because you are subscribed to the

[web2py] Re: Issue with latin /utf8 ??

2018-12-27 Thread Leonel Câmara
Ramos make sure you either use unicode or you're using utf-8 strings everywhere, this means also having # -*- coding: utf-8 -*- as the first line in your controller .py files. Then also make sure the javascript code you're using to get this knows the json is coming in utf-8. Then make sure

Re: [web2py] synchronizing / backing up my code between local web2py & PythonAnywhere web2py

2018-12-27 Thread Eliezer (Vlad) Tseytkin
Awesome article and exactly what I need! Thank you!! On Thu, Dec 27, 2018, 8:22 AM Carlos Cesar Caballero Díaz < carlos.caball...@cfg.jovenclub.cu wrote: > Maybe this can help: > > https://blog.pythonanywhere.com/87/ > > Greetings. > > > El 23/12/18 a las 1:45 p.m., Vlad escribió: > > What do

Re: [web2py] synchronizing / backing up my code between local web2py & PythonAnywhere web2py

2018-12-27 Thread Carlos Cesar Caballero Díaz
Maybe this can help: https://blog.pythonanywhere.com/87/ Greetings. El 23/12/18 a las 1:45 p.m., Vlad escribió: What do you guys generally do as far an syncing / backup? I mean, right now I am going back and forth local web2py <-> PythonAnywhere web2py So it's tedious to keep track what

Re: [web2py] Re: Issue with latin /utf8 ??

2018-12-27 Thread António Ramos
Maybe not :( [image: image.png] Em qua, 26 de dez de 2018 às 22:03, Leonel Câmara escreveu: > The problem you're seeing has only to do with printing it to a console > because it uses whatever encoding your console has. The json will be fine. > > -- > Resources: > - http://web2py.com > -