Deploy Django app to Azure: only displays the default app, even after deploying

I am trying to deploy a webapp for Azure. I am following these directions https://azure.microsoft.com/en-us/documentation/articles/web-sites-python-create-deploy-django-app/

First step, I created a webapp (Django) in the portal.

He then says to follow the instructions for configuring continuous deployment with GIT in Azure App Service. Apparently this should cause me to have a local Django file directory. https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/

So, I follow these directions by installing Git, creating a local repository, adding a web page, allowing me to host the web application repository.

Now Webportal shows what I have deployed ("active" deployment). However, when I go to the url of the web app, which display is NOT what I deployed, but most likely it's the default Django app with its urls (login, logout, contacts).

So I am building an actual Django app in my local directory (instead of the static index.html from the directions). I commit and push it to Azure. It is displayed as expanded.

The result will be the same as before: the default web application is shown.

So what I am missing is the link between my local repository and what is actually being displayed. Is there a way to pull the default Azure app into my local repository? (Then I can change it as I see fit.)

+1


source to share


1 answer


Things work as expected, but you ended up rewriting your Django app in your first Git declaration. Continuous deployment instructions, as written, are general for any deployment, even a blank web application.

So what I am missing is the link between my local repository and what is actually being displayed. Is there a way to pull the default Azure app into my local repository? (Then I can change it as I see fit.)

All you need to do is git clone

your repo after initializing your local Git repository in Azure Web App. You've already gone through most of these steps, but I'll include them here for others who may be looking for this answer.

After creating a Django web app from Azure Marketplace / Gallery, scroll down to set up continuous deployment.

enter image description here

Select Local Git Repo .

enter image description here

Note that you now have a Git Clone URL in both Quickstart Essentials details and All Settings -> Properties . Go and copy this url.



enter image description here

If you haven't already, you may need to install or reset your deployment credentials. This can be found under All Settings . These will be your Git and FTP credentials. Note that these are actually credentials for your Microsoft account, not just this web app.

enter image description here

You already have Git on your first try. Now you can navigate to the folder where you want to clone the repo and run:

git clone <your_git_clone_url>

      

enter image description here

After entering the password, you will have a cloned Django app repo on your local system. cd

to the directory and start working from there. After you make the changes git add .

, git commit

and git push

return them back to the repository in Azure, to see where your changes.

0


source







All Articles