Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-01 Thread Manuele Pesenti
On 01/03/2018 03:25, Dave S wrote: Don't you want a dummy parameter on verify_signature(), to prevent it being a URL-visible function? well actually it can even stay inside the models not a controller... in that case if it's not decorate as a service it cannot be visible. right?       

[web2py] Re: Table doesn't exist - in mySQL migrate

2018-03-01 Thread Dmitri Ermolaev
!!! in appconfig I use not boolean - it need in DB! if myconf.take('db.migrate'): migrate = True ## ONLY BOOLEAN! else: migrate = False ## ONLY BOOLEAN! if myconf.take('db.fake_migrate'): fake_migrate = True ## ONLY BOOLEAN! else: fake_migrate = False ## ONLY BOOLEAN!

[web2py] Table doesn't exist - in mySQL migrate

2018-03-01 Thread Dmitri Ermolaev
*Error in string:* * format='%(name)s',* *db.define_table('systems',** Field('name', length=25, readable=False, comment='name of tokenized system'),** Field('from_block', 'integer', comment='block was tested'),* * #migrate=False,** format='%(name)s',** )* (1146, u"Table

[web2py] Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-01 Thread 'Awe' via web2py-users
Hello, I post a simple step by step example, to explain. Doing a left join and using a where clause like: table.field==None Depending on _enable_record_versioning is enabled or not, I get different results when executing the identical query. The result when versioning is DISABLED is the correct

[web2py] Re: Option to load modified appconfig in rocket server

2018-03-01 Thread Leonel Câmara
An easy way would be to simply check for the port where the request was made and simply run rocket on a different port for testing e.g. then you would do something like this in the models if request.env.server_port == : # load alternate config -- Resources: - http://web2py.com -

[web2py] Re: Double left join syntax

2018-03-01 Thread Anthony
On Wednesday, February 28, 2018 at 11:16:32 AM UTC-5, Anthony wrote: > > SELECT * >> FROM >> OnResource >> LEFT JOIN Contact Owner ON Owner.id = OnResource.Contact >> LEFT JOIN Contact Proxy ON Proxy.id = OnResource.Proxy >> ORDER BY >> Owner.LastName, Owner.FirstName >> >> I tried

[web2py] Re: Option to load modified appconfig in rocket server

2018-03-01 Thread 黄祥
i think you can do it programmitacally, using the variable or create multiple appconfig.ini e.g. (dev_appconfig.ini), for the first suggestion, usually do this *models/db.py* from gluon.contrib.appconfig import AppConfig config_path = os.path.join(request.folder, 'private') configuration =

[web2py] Re: Option to load modified appconfig in rocket server

2018-03-01 Thread Anthony
On Thursday, March 1, 2018 at 7:02:53 AM UTC-5, Leonel Câmara wrote: > > An easy way would be to simply check for the port where the request was > made and simply run rocket on a different port for testing e.g. then > you would do something like this in the models > > if

[web2py] Option to load modified appconfig in rocket server

2018-03-01 Thread 'Yan Wong' via web2py-users
For testing purposes, I would like to set up some functional tests that check that web2py scripts work properly with different parameters set in appconfig.ini. Is there any way to fire up rocketsever and point it to a modified appconfig.ini file? -- Resources: - http://web2py.com -

[web2py] Re: Option to load modified appconfig in rocket server

2018-03-01 Thread 'Yan Wong' via web2py-users
Thanks. I really need to modify this programmatically for a functional test suite - it's not so much a dev vs prod thing. If I have a modified appconfig, how do I set web2py to use it for a particular rocket instance, but not normally? On Thursday, 1 March 2018 11:33:15 UTC, 黄祥 wrote: > > i

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-01 Thread Anthony
> > On Wednesday, February 28, 2018 at 3:50:16 PM UTC-8, Anthony wrote: >> >> I think you're on the right track. If you need the original request body >> to verify the signature, request.body.read() should do it. Does that not >> work? >> >> Also, I don't think you need the decorator and nested

[web2py] gevent and web2py

2018-03-01 Thread Pierre
Hi, Can I use* gevent* to build a homemade redis task queue and to execute these tasks? Does it make sense ? sorry if this is naiv questions i'm new to async programming... http://web2py.com/books/default/chapter/29/08/emails-and-sms?search=homemade from

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
On Thursday, March 1, 2018 at 3:58:52 PM UTC-5, Rob Paire wrote: > > Hi Anthony, > Yes web2py PG driver works fine, except it is too old, doesn't support > Postgres v10.2 > web2py does not ship with the psycopg2 driver, so if your driver is out of date, it is up to you to update your system.

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
Looks like it's finding the psycopg2 driver just fine -- the problem is that it is not finding a database named booster_i. You might need to specify the port in the connection string (e.g., "localhost:5432"). Anthony On Thursday, March 1, 2018 at 3:32:14 PM UTC-5, Rob Paire wrote: > > Hi

[web2py] Re: Option to load modified appconfig in rocket server

2018-03-01 Thread 'Yan Wong' via web2py-users
Great, thanks both. On Thursday, 1 March 2018 12:23:44 UTC, Anthony wrote: > > On Thursday, March 1, 2018 at 7:02:53 AM UTC-5, Leonel Câmara wrote: >> >> An easy way would be to simply check for the port where the request was >> made and simply run rocket on a different port for testing e.g.

[web2py] self.error ProgrammingError(u'ERROR', u'42P07', u'relation ..., u'1066', u'heap_create_with_catalog'

2018-03-01 Thread greenpoise
Hello there. Been trying to revive an app I had and somewhere in between updates it broke which is not a big deal but here is the thing. I switched (on a new blank .py model), to postgresql from SQLITE and all I get is errors similar to this: self.errorProgrammingError(u'ERROR', u'42P07',

[web2py] Where is Auth table on Database Administration?

2018-03-01 Thread greenpoise
Did anything changed that now the AUth table is not displayed on the Database Administration tool?? Thanks -- 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)

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Hi Anthony, Yes web2py PG driver works fine, except it is too old, doesn't support Postgres v10.2 -Rob On Mar 1, 2018 3:53 PM, "Anthony" wrote: > Looks like it's finding the psycopg2 driver just fine -- the problem is > that it is not finding a database named booster_i. You

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Anthony, This is surprising information, the server is brand new and all software is freshly installed. I will research further. Thank you for your help. -Rob On Thursday, March 1, 2018 at 4:40:19 PM UTC-5, Anthony wrote: > > On Thursday, March 1, 2018 at 3:58:52 PM UTC-5, Rob Paire wrote: >>

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
I am running the windows binary that is why PostgreSQL was working out of the box. The Windows binary distribution works out of the box with SQLite, MSSQL, Postgresql and MySQL. The Mac binary distribution works out of the box with SQLite. To use any other database back-end, run from the

[web2py] PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Hello web2py community! I am in the process of moving a 4 year old web2py application to a new server and I am having trouble getting the application to connect to PostgreSQL 10.2. I am guessing because the version of psycopg2 driver in web2py is: 2.5.4 (dt dec pq3 ext) I installed the

Re: [web2py] PostgreSQL 10.2

2018-03-01 Thread Richard Vézina
Base on this : https://github.com/web2py/pydal/blob/466a39f13e443bbcc54db2d1ba6ed10196abf440/pydal/drivers.py#L45 web2py shouldn't enforce a specific version of psycopg2... Are you using python 2 or python 3 and is your last psycopg2 version you mention is install for the python version that you

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Hi Richard, Thank you for your helpful reply. I am running the latest version of web2py 2_16_1. In order to query the version of psycpg2 which web2py is running put the following code into a view: {{import psycopg2}} {{=psycopg2.__version__}} This show web2py is running version 2.5.4 (dt dec

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
If you have a local installation of Python, it is generally better to run web2py from source, as it will be able to use whatever Python packages you have installed on your system. Anthony On Thursday, March 1, 2018 at 2:39:18 PM UTC-5, Rob Paire wrote: > > Hello web2py community! > > I am in

[web2py] Re: Where is Auth table on Database Administration?

2018-03-01 Thread Anthony
Don't think so. On Thursday, March 1, 2018 at 6:20:07 PM UTC-5, greenpoise wrote: > > Did anything changed that now the AUth table is not displayed on the > Database Administration tool?? > > > Thanks > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
Have you restarted the web2py server since updating psycopg2? Do you only have one Python installation on the system? On Thursday, March 1, 2018 at 5:35:59 PM UTC-5, Rob Paire wrote: > > Anthony, > This is surprising information, the server is brand new and all software > is freshly installed.

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Anthony
On Thursday, March 1, 2018 at 6:36:40 PM UTC-5, Rob Paire wrote: > > I am running the windows binary that is why PostgreSQL was working out of > the box. > > The Windows binary distribution works out of the box with SQLite, MSSQL, > Postgresql and MySQL. > Now I see the Windows binary does