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]
1012 questions
2
votes
1 answer
Apache2 server using a lot of CPU
The output of top
Tasks: 68 total, 1 running, 67 sleeping, 0 stopped, 0 zombie
Cpu(s): 96.0%us, 3.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Mem: 3840492k total, 1175776k used, 2664716k free, 27248k buffers
Swap: …

user1561753
- 69
- 1
- 6
2
votes
2 answers
File uploads and client_max_body_size in nginx + gunicorn + django
I need to configure nginx + gunicorn to be able to upload files greater than the default max size in both servers.
My nginx .conf file looks like this:
server {
# ...
location / {
proxy_pass_header Server;
proxy_set_header…

carlosescri
- 171
- 1
- 2
- 6
2
votes
1 answer
Django mutli-threading on apache/mod_wsgi/windows
I am quite new to the combination of apache and django and quite naive frankly regarding to how multi-threading is handeled. Specifically I run on a windows server, so I know the MPM is only thread-based.
I have an application which serves a…

Ilan lewin
- 123
- 1
- 3
2
votes
1 answer
Unable to serve Django static files
I am trying to serve Django admin static files but nothing seems to be working below is my nginx configuration :
upstream django {
server 127.0.0.1:8000;
}
server {
listen 4321;
server_name localhost;
charset utf-8;
…

VaIbHaV-JaIn
- 123
- 4
2
votes
1 answer
How to run multiple websites from one Django project on nginx and uwsgi
How to run two web sites or subdomains of a site from a single Django code base.
Each Django app in the project can then power a website on a different domain, but all the apps can still share a single database with a single administrative…

xcodepy
- 21
- 4
2
votes
0 answers
Nginx/uWSGI - upstream prematurely closed connection while reading response header from upstream
I've got an Ubuntu server configured with Nginx and uWSGI to serve Django which was setup and working with the default start page yesterday.
All I have done since is install MySQL and later PostgreSQL and add Db settings to Django and now I get a…

markwalker_
- 141
- 1
- 2
- 12
2
votes
2 answers
How to redirect all HTTP traffic to HTTPS for a Django 1.4 application running on an EC2 with nginx/uWSGI behind ELB with an SSL cert
I would like to know how to put my entire django site behind HTTPS. If anyone tries to come via HTTP I want that user to be redirected to HTTPS. Currently, firefox is giving me the error "Firefox has detected that the server is redirecting the…

Binary Maze
- 233
- 5
- 11
2
votes
1 answer
Supervisord unable to shutdown fcgi processes
I've managed to set up supervisord with fastcgi on a django project of mine, the problem is that when I make mi program stop, the server keeps running somehow, and my page keeps online.
Here is my supervisord program…

danielrvt
- 239
- 5
- 13
2
votes
0 answers
Nginx > Varnish > Gunicorn Error Too many Redirections
I have the following config:
Nginx > Varnish > Gunicorn > Django
I want to cache 2 versions of same site (mobile & web) with Varnish.
Gunicorn :
WEB: gunicorn_django --bind 127.0.0.1:8181
MOBILE: gunicorn_django --bind…

kollo
- 21
- 2
2
votes
1 answer
Getting error while install mod_wsgi on centos6.3 with python 2.7
In initially installed yum install mod_wsgi and i think it was linked with python 2.6
Now is there any way to link it with 2.7
I tried configuring from the source and i get this error
apxs -c -I/usr/local/include/python2.7 -DNDEBUG mod_wsgi.c…

Mirage
- 561
- 4
- 10
- 25
2
votes
0 answers
Stress testing Django app - how to improve throughput?
I'm having my first attempt at stress testing a simple django web app running from gunicorn and nginx which I’ve put on a small 256MB Rackspace Cloud server.
Using httperf, I increase the number of connections per second until I start getting…

Pete W
- 143
- 1
- 7
2
votes
2 answers
GIT and Django Projects
I have two servers, a Dev server and a Production server. The Production server runs a live Django site, while the Dev server has a copy of the Django project. I use the Dev server to work on the Django site, make improvements, fix bugs, etc. Once I…

Garfonzo
- 499
- 2
- 18
2
votes
2 answers
mod_rewrite, mod_alias, subdomain changes how domain serves website?
I've made a django site for a magazine, and it's found in mag.org/django-site. the old site is still at mag.org/httpdocs (hosted by mediatemple).
I would like it so that a hit to www.mag.org turns up the django site (as is currently the case,…

Cody Django
- 133
- 6
2
votes
1 answer
uWSGI & Django 1.4 - Bad Gateway and no error
I am having trouble getting Django and uWSGI to play nice on Ubuntu (12). It seems that the wsgi is loading and then the app is immediately crashing. None of the uwsgi logs are giving me anything to go by. I am using the standard Django 1.4 wsgi…

Hanpan
- 183
- 1
- 1
- 4
2
votes
1 answer
Application reports timeouts. However nginx has no record or log
We are serving Django via nginx/uwsgi. We use AWS ELB behind a VPC.
This is a webservice to Mobile clients.
We had reports of timeouts during development so we have added a concept of a request_id to every request
client generates request id
sends…

semarjt
- 21
- 1