To make your web application communicate to the data, yes you need to create Azure SQL Database and use the database administrator account details in settings.py to connect your Web Application with your database and perform CRUD operations.
You can create SQL Server in azure and then create a database inside it.
Please follow below steps to create SQL Server using Azure Portal.
Search for "sql server" on top search box and select SQL servers.
Click on + Create to create a new SQL Server.
Select Subscription and Resource Group, fill Server name, Location and Administrator account and then click on Review + create as shown below. Go to the resource once it is deployed.
Do not forget to Allow azure service and resources to access this server in Firewall and virtual networks under Security for SQL Server.
Create Database in your SQL server.
Give the database name and you can keep all other options as default. Click on create and review and then create the DB.
Once your DB is deployed. You need to whitelist the IP to run SQL query on this DB. Go to the query editor in your Database and provide your password. Click on the appearing message to whitelist the IP.
To connect the database with your Django framework, the simple way is that follow the django-pyodbc-azure README to install python packages pyodbc & django-pyodbc-azure and configure the settings.py file of Django correctly as below.
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': '<DatabaseName>',
'USER': '<UserName>',
'PASSWORD': '{your_password_here}',
'HOST': '<ServerName>',
'PORT': '<ServerPort>',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
'MARS_Connection': 'True',
}
}
}