Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi all,

I am using Django 3.2 , could I use Django with Sql Anywhere ?

Thanks in advance

asked 08 Nov '21, 22:15

arminkw's gravatar image

accept rate: 0%

Never tried this. If this is just Python, probably you can start with this thread:

(09 Nov '21, 08:51) Vlad
Replies hidden

While Django as such is certainly supported and is also used by this very site AFAIK, I think Armin's question is about support for Django 3.2.

(I don't know...)

(09 Nov '21, 10:06) Volker Barth

ok, then I am stupid. Understood his question wrong. I'd say.... it is not that difficult to install SA + Django and give them a try :)

(09 Nov '21, 14:56) Vlad

Try asking graeme.perrow at

(10 Nov '21, 15:42) Breck Carter

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 in the variable DATABASES , I copy the definition of my database:

      '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\", line 48, in <module> 
Database.register_converter(Database.DT_DECIMAL, util.typecast_decimal) AttributeError: module 'django.db.backends.utils' has no attribute 'typecast_decimal'
What I'm doing wrong, Thanks in advance Armin

permanent link

answered 10 Nov '21, 18:56

arminkw's gravatar image

accept rate: 0%

edited 11 Nov '21, 02:01

Volker%20Barth's gravatar image

Volker Barth

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.

(11 Nov '21, 02:07) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Nov '21, 22:15

question was seen: 709 times

last updated: 11 Nov '21, 02:11