简体   繁体   中英

ImportError at / when deploying application to Azure Cloud

I have a boilerplate application, that I wanted to deploy on Azure. Locally it runs fine, but when I deploy to Azure cloud, I get:

ImportError at /

cannot import name 'views' from 'eve' (unknown location)

I tried changing the import to my eve app.. but I get same error. Here is my traceback: http://dpaste.com/3Q23GMD

Generally, there are two ways to deploy a Django app on Azure App Service.

  1. To deploy it on Azure WebApp for Linux, it's simple to follow the offical documents Create a Python web app in Azure App Service on Linux (Preview) and Configure your Python app for the Azure App Service on Linux to deploy a docker image which includes your app.
  2. To deploy it on Azure WebApp (classic for Windows), it seems to be no document introduce it now, and there is not enough information for confirming your issue in your description. So per my experience, I think the issue was caused by deploying incorrectly in this case. I suggest that you can try to follow my answer of an old SO thread Why is the azure app service django deploy keep failing? to check your deployment steps to fix it.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM