I have seen that I am trying to get to the bottom of that. The string
"NO_AUTO_CREATE_USER"
does not appear in web2py, in dal, nor in rocket. My guess is that the
error is caused by mysqldb. Do you agree?
On Friday, 15 September 2017 17:40:07 UTC-5, Yan Wong wrote:
>
>
>
> On Monday, 11
Yan's example worked. But still there are some quirks with the scheduler
using connections for long processes.
You are able to change T and F for good editing
gluon.packages.dal.dialects.base.py line 36
then use Field(.., type = "boolean") as usual. No adapter change with
problems or
Thanks Yan, i will use your example if i cant fix this.
I can confirm the problem on Version
2.15.3-stable+timestamp.2017.08.07.12.51.45.
This is dal declaration working fine on previous versions
db = DAL("mysql://myuser:mypassw@localhost/myapp", pool_size = 10,
check_reserved=False, migrate
The following seems to work, by the way (modified from
https://groups.google.com/forum/#!topic/web2py/TZsLnytjqhA)
## allow mysql tinyint
from gluon.dal import SQLCustomType
boolean = SQLCustomType(
type ='boolean',
native='TINYINT(1)',
On Monday, 11 September 2017 00:08:00 UTC+1, Massimo Di Pierro wrote:
>
> what adapter are you using. What is your URI string (without passwords
> please)?
>
By the way, starting web2py using Rocket now says
/usr/local/lib/python2.7/site-packages/pymysql/cursors.py:166:
Warning: (3090,
On Monday, 11 September 2017 00:08:00 UTC+1, Massimo Di Pierro wrote:
>
> what adapter are you using. What is your URI string (without passwords
> please)?
>
Apologies for the slow reply. Annoyingly, I've found that the solution
(without copy) doesn't work at the moment. I'm using the
Hi Massimo.
This is the db declaration im using. It works well so far not using copy.
Standard MySQL 5.5.24 connection. I have read that using BIT may cause
problems on calculations with another fields, so TINYINT(1) (-127, 127)
would do for a lack of a better option.
db =
what adapter are you using. What is your URI string (without passwords
please)?
On Monday, 4 September 2017 09:53:46 UTC-5, Yan Wong wrote:
>
> With this code, I now find that with the latest version of web2py
> (2.15.4), I get
>
> File "applications/XXX/models/db.py", line 46, in
>
With this code, I now find that with the latest version of web2py (2.15.4),
I get
File "applications/XXX/models/db.py", line 46, in
db._adapter.types = copy.copy(db._adapter.types)
AttributeError: can't set attribute
I have deleted the copy.copy line, so that I am modifying the adapter
Excuse me, one last question.
Is it really necesary?
import copy
db._adapter.types = copy.copy(db._adapter.types)
or modify the adapter right away will work? It looks like it does, but i
dont know if theres any implication by skiping copy.
Thanks
--
Resources:
- http://web2py.com
-
Im sorry i just seen Massimo's answer at the post:
https://groups.google.com/forum/#!searchin/web2py/boolean$20values/web2py/IukqqZF_PPE/Dehg9dKUT58J
import copy
db =DAL()
db._adapter.types = copy.copy(db._adapter.types)
db._adapter.types['boolean']='TINYINT(1)'
db._adapter.TRUE = 1
Eventually take a look here:
http://www.web2pyslices.com/slice/show/1611/postgresql-custom-adapter
On Mon, Jan 11, 2016 at 5:57 PM, Alfonso Serra wrote:
> Im sorry i just seen Massimo's answer at the post:
>
>
Its weird the application seems to work fine but cant create a select() at
the console. The queries in the controllers doesnt fail.
This is the db definition:
if not request.env.web2py_runtime_gae:
db = DAL("mysql://root:@localhost/mydb", pool_size = 10, check_reserved=
None, migrate=True)
13 matches
Mail list logo