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?


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


  • 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.

Answered By – ndpu

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published