Django web app deploy in Azure via Visual Studio 2017

后端 未结 2 838
甜味超标
甜味超标 2021-01-24 11:22

I\'ve made a simple app with Django in Visual Studio 2017, utilizing the default template in Visual Studio (file - new - project - python - django web application). The app runs

2条回答
  •  梦谈多话
    2021-01-24 12:21

    In consideration of using Visual Studio to create & deploy a Django App for Azure, I suggest that you can follow the Azure offical tutorial Django and MySQL on Azure with Python Tools 2.2 for Visual Studio to inspect & make sure your steps correctly.

    There are some checkpoints as below.

    1. Make sure PTVS installed correctly, please move to here to know more details of PTVS.
    2. Create a virtual environment for a Python version like 2.7 via PTVS.
    3. Edit the requirements.txt file of your project, and make sure there is a record for Django like Django==1.11.2.
    4. When you want to deploy it to Azure WebApps, please check the Python version for Azure WebApps that is the same with your project.
    5. If your Django App doesn't still work as you want, please refer to the document to check the configuration of the web.config file via access the Kudu tool https://.scm.azurewebsites.net and other troubleshooting content, and refer to the document to check the application settings on Azure portal.

    Hope it helps. Any concern, please feel free to let me know.

提交回复
热议问题