Cody Blog

Notes of using Django in Azure App Service


There is an debug conolse that you can exectue some commands for Django related tasks. The debug console is:


Migrate django database in Azure

  1. Go to D:\home\site\wwwroot directory

  2. Exceute migrate command

    D:\home\site\wwwroot> .\env\Scripts\python.exe migrate

Create super user

echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', '', 'your_password')" | python shell

Adjest timezone

Go to azure portal,


Set WEBSITE_TIME_ZONE to anyvalue defined in here: …