- Have an active Microsoft Azure account with webapp access
- Have your django code already up on github
- Download and extract this zip file and add the contents (
ptvs_virtualenv_proxy.py
,runtime.txt
,requirements.txt
,web.config
) to your root project folder (same level asmanage.py
) - Add those files to your git repo and push it up to github
-
Click on
+ New
-
Click on
Web + Mobile
-
Change your app name to something you want. The URL will be
whatyouchoose.azurewebsites.net
and add the same name for theNew Resource Group Name
-
Click on
App Service
and click on+ Create New
in the next tab -
Add an
App Service Plan
name. I suggesteast-asia
-
Click on
Location
and chooseEast Asia
-
Click on
OK
-
After the app has been created, type in
github
in the settings search bar -
Click on
Deployment Source
-
Click on
Choose Source
and chooseGithub
-
Click on
Authorization
-
Click on
Authorize
and clickApprove
- Click on
Choose Project
- Click on your Django Girls blog project on the right side
- Click on
OK
.
-
Wait for your project to build. It will take a few minutes. Take a break!
-
Click on the
Microsoft Azure
logo to go back to the dashboard -
Click on
Tools
-
Click on
Kudu
-
Click on
Debug Console
-
Within the console, type in
cd site\wwwroot
-
Then type in
env\Scripts\python manage.py migrate
and then wait for the migration to finish -
To create the superuser on the site, Type in
env\Scripts\python manage.py shell
-
After
Python 3.4.3 ...
appears, press enter on your keyboard -
Type in
from django.contrib.auth.models import User
and press enter -
Type in
User.objects.create_superuser('USERNAME', 'EMAILADDRESS', 'PASSWORD')
MAKE SURE YOU CHANGE THE USERNAME, EMAIL ADDRESS AND PASSWORD. And press enter -
Type in
exit()
and press enter. Go back to the previous tab/window where the Azure Dashboard is -
Click on the URL and visit your new site LIVE on the internet!