Django Gives "502 Bad Gateway" Error On Google App Engine
Solution 1:
The application is complaining about not finding the main
module, the document that you mentioned aboards a different problem than yours, you're not reaching the point of using the storage library.
Regarding your specific problem. As mentioned in the documentation:
The runtime starts your app by running the command you specify in the entrypoint field in your app.yaml file.
In this case your app.yaml
isn't specifying an entrypoint, when this happens you have to make sure that you fulfill the next requirements:
If your app meets the following requirements, App Engine will start your app with the gunicorn web server if you don't specify the entrypoint field:
The root of your app directory contains a main.py file with a WSGI-compatible object called app.
Your app does not contain Pipfile or Pipfile.lock files.
In this case your application is lacking the main.py
file which is the error App Engine is complaining about. There are multiple ways to avoid this error (like specifying an entrypoint). What I suggest in this case is to create a file named main.py
on your root folder of your app and include the next:
from mysite.wsgi importapplicationapp= application
An example containing the structure required to run a Django app can be found here
Post a Comment for "Django Gives "502 Bad Gateway" Error On Google App Engine"