Django Application Deployed but Test Page Shows Default Page

jjmcinto 51 Reputation points
2022-03-18T21:05:35.807+00:00

I deployed my code and confirmed it is present in the App Service on Linux but my test page shows the default page. It has been in this state for over a day, so I would say I have already tried the "wait-and-see" approach.

The top-level directory contains:

  • db.sqlite3
  • my main project folder
  • my app folder
  • manage.py
  • requirements.txt

I checked the log file and it shows no errors. I would like to solve this problem but do not know where to look next.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Takahito Iwasa 4,851 Reputation points MVP Volunteer Moderator
    2022-03-18T23:05:42.663+00:00

    Hi.

    Have you tried troubleshooting if the default page is displayed?
    https://learn.microsoft.com/ja-jp/azure/app-service/configure-language-python#app-doesnt-appear

    • Restart the App Service, wait 15-20 seconds, and check the app again.
    • Be sure you're using App Service for Linux rather than a Windows-based instance. From the Azure CLI, run the command az webapp show --resource-group <resource-group-name> --name <app-name> --query kind, replacing <resource-group-name> and <app-name> accordingly. You should see app,linux as output; otherwise, recreate the App Service and choose Linux.
    • Use SSH to connect directly to the App Service container and verify that your files exist under site/wwwroot. If your files don't exist, use the following steps:
      • Create an app setting named SCM_DO_BUILD_DURING_DEPLOYMENT with the value of 1, redeploy your code, wait a few minutes, then try to access the app again. For more information on creating app settings, see Configure an App Service app in the Azure portal.
      • Review your deployment process, check the deployment logs, correct any errors, and redeploy the app.
    • If your files exist, then App Service wasn't able to identify your specific startup file. Check that your app is structured as App Service expects for Django or Flask, or use a custom startup command.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.