michiya / django-pyodbc-azure

Django backend for Microsoft SQL Server and Azure SQL Database using pyodbc
https://pypi.python.org/pypi/django-pyodbc-azure
BSD 3-Clause "New" or "Revised" License
321 stars 140 forks source link

cannot sync models with geometry field to MS SQL Server #187

Open joshdpocock opened 6 years ago

joshdpocock commented 6 years ago

I'm unable to migrate any model which has a Django built in geometry field (e.g. Point, Polygon etc). I keep getting the error 'AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type''.

Does django-pyodbc-azure support geometry data?

singhravi1 commented 5 years ago

No, this does not support geometry fields.

joshdpocock commented 5 years ago

Thank you for your reply, I found a workaround by converting sql geometry fields to varchar fields with WKT geometry and then converting them to GEOSGeometry Objects. It's working well and I'm very pleased with django-pyodbc-azure.