Deploy a simple VS2017 Django app to Azure - server error

前端 未结 3 782
再見小時候
再見小時候 2021-01-27 03:53

I\'ve been trying to create a Django web app using VS2017 Preview (which includes Python tools for Visual Studio), and deploy the resulting app to Azure (I\'m currently on the 3

3条回答
  •  长发绾君心
    2021-01-27 04:07

    1. Create a WebApp on Azure (Do not enable python in Application Settings !)

      From deployment option select local git repository: From properties copy the git url:

    2. Copy virtualenv_proxy.py file from https://github.com/Azure-Samples/python-docs-hello-world into your folder.

    3. Create a file runtime.txt and write python-3.4 into it.

    4. Create a file web.3.4.config with content :

    
      
        
        
        
        
        
        
      
      
        
        
          
        
        
          
            
              
                
              
            
            
              
              
                
              
              
            
          
        
      
    
    

    The only settings you need to change here is the value for DJANGO_SETTINGS_MODULE, replace myModule with your module name. All the over settings and paths should be exactly the same if you created an Web App.

    1. Push everything to the git url you got at point 1, Azure will detect and set up Python 3.4 and install all packages from requirements.txt. After that everything should work. If not, connect using ftp and look into \LogFiles\wfastcgi.log for the error.

提交回复
热议问题