on 2021 Nov 08 10:15 PM
Hi all,
I am using Django 3.2 , could I use Django with Sql Anywhere ?
Thanks in advance
Request clarification before answering.
Hi all , Thank you very much for your responses.
Using DOS cmd I install the engine for SQL Anywhere 16, running this comand: pip install sqlany-django The engine is installed OK
In Django file settings.py in the variable DATABASES , I copy the definition of my database:
DATABASES = { 'default' : { 'ENGINE': 'sqlany_django', 'NAME': 'django', 'USER': 'dba', 'PASSWORD': 'sql', 'HOST': 'localhost', 'PORT': '2644', } }And always receive the same error:
File "C:\\Users\\armin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\sqlany_django\\base.py", line 48, in <module>What I'm doing wrong, Thanks in advance Armin
Database.register_converter(Database.DT_DECIMAL, util.typecast_decimal) AttributeError: module 'django.db.backends.utils' has no attribute 'typecast_decimal'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't use Django but from my limited understanding, it seems that Django 2.x dropped/modified that attribute, see here for a similiar Firebird change.
I would suspect that the sqlany-django package would need to be adapted, as well. Hopefully @Graeme is listening...
Of course you could verify that claim with also trying to use Django 1.x which is supported by sqlany-django according to the package docs.
User | Count |
---|---|
47 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.