[web2py] p4web auth issues

2020-02-22 Thread Maurice Waka
Using this code, File "apps/_scaffolds/controllers.py", line 82, in index db.posts.insert(message="Welcome "+auth_user.first_name+'.'+' Thank you for signing in with us. Blah blah blah.', author=auth.user_id, created_by=auth.user_id, modified_by=auth.user_id) I get an error: NameError:

[web2py] Deploying of a web2py based webapp on GAE fails with 'No module named 'google'

2020-02-22 Thread Sreedevi
My aim is to create a python 3 based webapp using web2py 2.18.5 + google cloud sdk 281.0.0 + python 3.7.6. I am using the web2py's inbuilt welcome app. - The app.yaml and requirements.txt file that I am using are attached - I can run this web2py app on my local machine and view the

[web2py] Re: unexpected end of stream - py4web

2020-02-22 Thread Massimo Di Pierro
Can you show us some minimum code to rproduce? On Friday, 21 February 2020 20:38:08 UTC-8, Edoardo Torrini wrote: > > Hi > > I create a project client/server compose by an application mobile (client) > and a webservice (py4web). > the application create request to the webservice and the server

[web2py] Substituting an email address with a reference in a web2py emailing form

2020-02-22 Thread mostwanted
I've created an emailing form in my application but have substituted where the email goes with a reference that contains the email, the problem is that now the email is not being sent unless i write a proper explicit email address. Whats the difference between writing an explicit email address

Re: [web2py] Using postgresql with py4web gives error

2020-02-22 Thread Maurice Waka
OK. Thanks for the update. I reinstalled postgresql. I'll check performance. Regards On Sat, Feb 22, 2020, 16:38 E L wrote: > If you are using ## in the password, that might cause problems for the > URL/URI parser since # is part of URL structure. > Otherwise, it looks like postgres is not

Re: [web2py] py4web issue on get requests

2020-02-22 Thread Christian Varas
Hi Torrini, I don’t know what is causing the error but you can use a local proxy like burp suite to catch your client request and see what’s wrong with that request. If is malformed you can see with with this. Cheers. El El sáb, 22 de feb. de 2020 a la(s) 01:38, Edoardo Torrini <

Re: [web2py] Using postgresql with py4web gives error

2020-02-22 Thread E L
If you are using ## in the password, that might cause problems for the URL/URI parser since # is part of URL structure. Otherwise, it looks like postgres is not running. On Wed, Feb 19, 2020 at 10:32 AM Maurice Waka wrote: > > db = DAL( "postgres://mauricewaka:b123test##@localhost:5432/mydb") >

[web2py] Re: Redirect "website.pythonanywhere.com" to "www.newwebsite.de"

2020-02-22 Thread villas
Hi Alexander If you cannot redirect using the webserver, and you cannot figure out routes, I guess you could still do something simple in your web2py controller, like this... def index(): redirect('https://www.my_redirected_site.com{0}'.format(request.env.request_uri)) -- Resources: -

[web2py] Re: Many records in one transaction

2020-02-22 Thread villas
You do not explain why you would need to delete and then insert 25K records to prepare a timetable. It seems that you are creating a temporary table and that is seldom the correct approach. - If all the data is already available in the tables, then you should be able to write SQL

[web2py] Re: select for list:integer, but in a specific position

2020-02-22 Thread p a
And a second version with SUBSTR def operator_field_starts(field, first_int, query_env={}): '''bla bla ''' if not field.type != 'list:integer': raise AttributeError, "bla bla" dialect = field._dialect second = '|'+dialect._like_escaper_default(str(first_int))+'|'

[web2py] Re: select for list:integer, but in a specific position

2020-02-22 Thread p a
I came up with a first version that works: def operator_field_starts(field, first_int, query_env={}): '''bla bla ''' if not field.type.startswith('list:'): raise AttributeError, "bla bla bla" dialect = field._dialect arg =