Questions tagged [django-wsgi]

django-wsgi refers to the WSGI deployment platform for Django

django-wsgi refers to the WSGI deployment platform for Django.

See documentation.

225 questions
193
votes
40 answers

Django stops working with RuntimeError: populate() isn't reentrant

I've been developing a Django web application deployed on an Apache server with WSGI, and everything has been going smoothly. Today, I made some minor changes to my app's admin.py in an attempt to customize the build-in Django Admin interface, and…
Edward
  • 5,942
  • 4
  • 38
  • 55
62
votes
3 answers

Debugging Apache/Django/WSGI Bad Request (400) Error

My simple Django app worked fine in debug mode (manage.py runserver), and works under WSGI+Apache on my dev box, but when I pushed to EC2 I began receiving intermittent (10-80% of the time) errors of Bad Request (400) for any URLs I try to view…
mrisher
  • 1,062
  • 2
  • 9
  • 15
61
votes
12 answers

ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI

I am trying to publish my site on an Amazon's EC2 Instance, and I keep getting a 500 error. I really don't know why. //Log Files [Sun Feb 17 23:12:48.066802 2013] mod_wsgi (pid=2102): Target WSGI script '/srv/www/app/poka/apache/wsgi.py' cannot…
abisson
  • 4,365
  • 9
  • 46
  • 68
32
votes
3 answers

Django + apache & mod_wsgi: having to restart apache after changes

I configured my development server this way: Ubuntu, Apache, mod_wsgi, Python 2.6 I work on the server from another computer connected to it. Most of the times the changes don't affect the application unless I restart Apache. In some cases the…
nemesisdesign
  • 8,159
  • 12
  • 58
  • 97
29
votes
6 answers

Setting up Django on AWS Elastic Beanstalk: WSGIPath not found

I've been trying for several days now to set up Django under Amazon Web Services' Elastic Beanstalk. I think the problem I'm hitting is this one: ERROR - Your WSGIPath refers to a file that does not exist. I followed the tutorial here and all goes…
27
votes
2 answers

uwsgi options --wsgi-file and --module not recognized

I am trying to run a Django app using uwsgi. Most instructions I have found refer to a "--wsgi-file" and "--module" to specify the application, but "uwsgi" makes no mention of these options, and when I try and use them: uwsgi -s /tmp/uwsgi.sock…
aaa90210
  • 11,295
  • 13
  • 51
  • 88
26
votes
4 answers

Gunicorn Environment Variable Setting

I'm currently having difficulty passing environment variables into Gunicorn for my Django project. I'm on the latest 19.1 version. I have a wsgi.py file like so: import os import sys from django.core.wsgi import get_wsgi_application BASE_DIR =…
Huw
  • 533
  • 1
  • 7
  • 15
20
votes
3 answers

How to server HTTP/2 Protocol with django

I am planing to deploy my Django application with HTTP/2 protocol but I'm unable to find the proper solution. How can I serve my Django web application with HTTP/2, the only thing that I find is hyper-h2. I read the documentation but unable to setup…
Pankaj Sharma
  • 2,185
  • 2
  • 24
  • 50
13
votes
6 answers

Django + mod_wsgi + apache: ImportError at / No module named djproj.urls

I'm trying to deploy my Django application on my linode server with apache and mod_wsgi. file: /srv/www/example.com/djproj/django.wsgi import os import sys sys.path.append('/srv/www/example.com/djproj') os.environ['PYTHON_EGG_CACHE'] =…
Fred Collins
  • 5,004
  • 14
  • 62
  • 111
10
votes
2 answers

gzip not working in Django with Whitenoise

I have a Django website deployed on Heroku, using Whitenoise for serving static files. The static files work fine but Gzip is not working according to various websites that I used to test it (including google tools). this is the code in my…
davegri
  • 2,206
  • 2
  • 26
  • 45
10
votes
5 answers

Problems configuring deployment with Heroku/gunicorn/django

I'm trying to run my django application on heroku. Folder structure: app/ Procfile docs/ ... project/ manage.py wsgi.py Procfile web: gunicorn --pythonpath="$PWD/project" wsgi:application --log-file=- Error I'm…
Avi Meir
  • 980
  • 3
  • 11
  • 26
10
votes
2 answers

Reload django wsgi scripts without root

I have an install of django on apache using embedded wsgi. I DON'T have root on the machine. How can I tell apache to reload the python instance when I deploy new source code? I tried removing all the .pyc files and it still is running the old…
Paul Tarjan
  • 48,968
  • 59
  • 172
  • 213
9
votes
2 answers

Why do we have to provide WSGI_APPLICATION variable in Django settings

I'm a beginner Django developer so if this question doesn't make sense please forgive me. We provide a variable called WSGI_APPLICATION in django settings along with ROOT_URLCONF and some other settings variables. and we provide settings file path …
Wendy
  • 1,523
  • 3
  • 12
  • 16
8
votes
2 answers

What is the best way to run Django on Tornado Web Server to have async + django admin + django orm possibilities?

I would like to have django admin panel with tornado backends, which will process requests from online game. I dont know at the moment, is it a good idea to load django app in the next way: wsgi_app =…
Romans Ruskovs
  • 197
  • 2
  • 8
8
votes
2 answers

Matplotlib created a temporary config/cache directory

Matplotlib created a temporary config/cache directory at /var/www/.config/matplotlib because the default path (/tmp/matplotlib-b33qbx_v) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable…
1
2 3
14 15