Search code examples
djangoazuredjango-pyodbc-azure

How to set up Django Azure website to access database


I am trying to set up my Django site using Azure Websites (not an Azure VM). I got a site with some static pages up and running, and I created an Azure SQL Database, but how do I connect the Django site to use the Azure db?


Solution

  • Try django-pyodbc-azure

    django-pyodbc-azure is a refined fork of django-pyodbc, a Django MS SQL Server external DB backend that uses ODBC by employing the pyodbc library. It supports MS SQL Server and Windows Azure SQL Database.

    Features

    • Supports Django 1.9.6
    • Supports Microsoft SQL Server 2005, 2008/2008R2, 2012, 2014, 2016 and Azure SQL Database
    • Supports LIMIT+OFFSET and offset w/o LIMIT emulation.
    • Passes most of the tests of the Django test suite.
    • Compatible with SQL Server , SQL Server Native Client , Micosoft ODBC Driver 11 for SQL Server on Windows and FreeTDS ODBC drivers.