Cody Blog

Software development

Notes of using Django in Azure App Service

DebugConsole

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

https://{YOUR_PROJECT_NAME}.scm.azurewebsites.net/DebugConsole

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 manage.py migrate

Create super user

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

Adjest timezone

Go to azure ...