Gunicorn, no module named ‘myproject

Your error message is ImportError: No module named ‘myproject.wsgi’ You ran the app with gunicorn –bind 0.0.0.0:8000 myproject.wsgi:application And wsgi.py has the line os.environ.setdefault(“DJANGO_SETTINGS_MODULE”, “settings”) This is the disconnect. In order to recognize the project as myproject.wsgi the parent directory would have to be on the python path… running cd .. && gunicorn –bind 0.0.0.0:8000 … Read more

How to make Django serve static files with Gunicorn?

When in development mode and when you are using some other server for local development add this to your url.py from django.contrib.staticfiles.urls import staticfiles_urlpatterns # … the rest of your URLconf goes here … urlpatterns += staticfiles_urlpatterns() More info here When in production you never, ever put gunicorn in front. Instead you use a server … Read more

Does Gunicorn run on Windows

Technically this is not an answer. But practically the answer I was looking for is how to run a WSGI web app (like Django) on Windows, and for those who got into this page because of that, here it is: I’m using waitress now, very good alternative 🙂 Basically all you have to do is … Read more

Gunicorn Workers and Threads

Let me attempt an answer. Let us assume that at the beginning my deployment only has a single gunicorn worker. This allows me to handle only one request at a time. My worker’s work is just to make a call to google.com and get the search results for a query. Now I want to increase … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)