Template for Auzre SQL and restAPI in Django Python
For Mac/ Linux
python3 -m venv .venv
source .venv/bin/activate
For Windows
python3 -m venv .venv
.venv\Scripts\activate
where python
pip install -r requirements.txt
In Django, migrations are a way to propagate changes made to your models (database schema) into the actual database.
When you run:
python3 manage.py makemigrations
Django will:
- Scans the models.py file in your Django app.
- Detects changes (like adding a new model, modifying a field, etc.).
- Generates a migration file inside the migrations/ directory of your app.
- The migration file contains instructions (SQL-like operations) that Django will use to update the database.
python3 manage.py migrate
python3 manage.py runserver
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
HOMEBREW_ACCEPT_EULA=Y brew install msodbcsql18 mssql-tools18
Download ODBC Driver for SQL Server
or
msiexec /i msodbcsql.msi ADDLOCAL=ALL