Django, "the web framework for perfectionists with deadlines", is a Python-based framework for creating web applications. With a powerful object-based database mapper, a clean syntax for mapping URLs to views, a simple template language and a convenient automatically generated administration interface, Django is the most popular of the Python web frameworks.
Questions tagged [django]
1015 questions
8
votes
2 answers
nginx not serving admin static files?
Clarification: The following error is onlyfor the admin static files, i.e. it is specific to the static files corresponding to the Django admin. The rest of the static files are working perfectly.
Problem
Basically, I cannot access the admin static…
![](../../users/profiles/450169.webp)
toto_tico
- 181
- 1
- 1
- 6
8
votes
2 answers
Long running requests with gunicorn + nginx
I've put together an integration server for our Django-powered application. A few of the features are still experimental, and result in overly long requests.
I'm okay with the poor performance, for now, but I need to be able to integrate. Whenever…
![](../../users/profiles/44869.webp)
Matt Luongo
- 201
- 1
- 2
- 8
8
votes
1 answer
Python/Django/WSGI/Apache - "ImportError: No module named site"
I am trying to use a django application on my local ubuntu machine. However the site doesn't work and my /var/log/apache2/errors.log is filled with messages like this:
ImportError: No module named site
My /var/log/apache2/error.log (for today)…
![](../../users/profiles/8950.webp)
Amandasaurus
- 30,211
- 62
- 184
- 246
8
votes
3 answers
Which Apache package is best for mod_wsgi Django application?
In Ubuntu (and Debian, and other distro) there is a few Apache packages (mpm-event, mpm-prefork, mpm-worker). Which is the most suitable for hosting Django mod_wsgi application on single CPU server? Which package is best choice for OpenVZ container?
![](../../users/profiles/3839.webp)
miHost
- 183
- 2
- 6
8
votes
2 answers
Invalid HTTP_HOST header. The domain name provided is not valid according to RFC 1034/1035
I am getting Invalid HTTP_HOST header error on my server. I don't understand why it's happening and how to fix it. Everytime it happens backend stops working and I have to restart the server.
Any help will be appreciated.
Thanks in advance!
FYI…
![](../../users/profiles/612744.webp)
Chetan Ganji
- 83
- 1
- 1
- 3
7
votes
1 answer
Cron job running a Django Python command through a virtual environment not working
I have a crontab file supposedly executing a Django command after loading the project virtual environment:
*/1 * * * * source /home/virtualenvs/mydjangoproject-venv/bin/activate && python /home/www/production/mydjangoproject/manage.py…
![](../../users/profiles/460494.webp)
bolino
- 273
- 3
- 12
7
votes
1 answer
gunicorn not fully reloading after an HUP signal
I'm trying to get a working supervisor/gunicorn/django setup on vagrant. I am using python-watchdog to try and restart gunicorn when code changes happen.
I am using the following supervisor configuration for…
![](../../users/profiles/39380.webp)
synic
- 783
- 1
- 8
- 13
7
votes
1 answer
Python Threads and uWSGI Harakiri
I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few threads to handle some long-running functions. The…
![](../../users/profiles/143556.webp)
jmetz
- 181
- 4
7
votes
4 answers
ubuntu + nginx + uwsgi + django No Python application found
I am trying to setup my server with a nginx to uwsgi to django stack, but I am having problems with the uwsgi part.
When I run uwsgi and pass in all the parameters on the command line, it works properly. My uwsgi call looks like this:
uwsgi…
![](../../users/profiles/163045.webp)
OpIvy
- 113
- 1
- 1
- 5
7
votes
1 answer
Running django custom management commands with supervisord
I'd like to use supervisord to run some commands for my Django project but I keep getting the following error:
supervisor.log:
2012-05-18 17:52:15,784 INFO spawnerr: can't find command 'source'
If I remove the "source" command, the log shows the…
![](../../users/profiles/49484.webp)
mfsaint
- 201
- 2
- 2
7
votes
2 answers
Setup CNAME for subdomain issue
I would setup for this:
user go to test.example_site1.org
test.example_org1.org it's a CNAME of test.example_org2.org
user will see the page of test.example_org2.org
On the example_org2.org server I use nginx and I have 3 django…
![](../../users/profiles/79993.webp)
Fred Collins
- 251
- 1
- 4
- 10
7
votes
1 answer
How to get nginx to pass HTTP_AUTHORIZATION header to Apache
Am using Nginx as a reverse proxy to an Apache server that uses HTTP Auth. For some reason, I can't get the HTTP_AUTHORIZATION header through to Apache, it seems to get filtered out by Nginx. Hence, no requests can authenticate.
Note that the…
![](../../users/profiles/12493.webp)
codeinthehole
- 313
- 2
- 6
- 10
7
votes
1 answer
Django + gunicorn + virtualenv + Supervisord issue
I have a strange issue with my virtualenv + gunicorn setup, only when gunicorn is launched via supervisord. I do realize that it may very well be an issue with my supervisord and I would appreciate any feedback on a better place to ask for…
![](../../users/profiles/39920.webp)
Florian Le Goff
- 121
- 1
- 5
6
votes
4 answers
How do I implement SSL on a private IP?
I am developing a network management product. We ship our product to customers as a VM, which they install on a hypervisor in their network. These VMs are given static, private IP addresses in the customer network. They monitor the customer's…
![](../../users/profiles/502216.webp)
BThompson
- 191
- 1
- 1
- 7
6
votes
1 answer
Django with Apache and mod_wsgi: no system log unless setting Debug = True
I'm using apache web server and mod_wsgi to transfer request to django.
$ apache2ctl -v
Server version: Apache/2.4.10 (Raspbian)
Server built: Sep 17 2016 16:40:43
I'm using this apache site to declare django app:
ServerName…
![](../../users/profiles/431459.webp)
Thomas
- 61
- 1
- 5