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 ...

learn more… | top users | synonyms

3
votes
1answer
210 views

Document and best practices for configuration of a dedicated server (Centos) to serve just one website

I have just bought a dedicated server and they provide me a IP address, access info as root and machive with Centos 5. I would like to serve my django app in that machine but because I have no ...
3
votes
1answer
7k views

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 ...
3
votes
2answers
1k views

Nginx / uWsgi / Django site can handle more traffic with rewrite URL

I'm running a Django app, using uWsgi behind Nginx. I've been doing some performance tuning and load testing using ApacheBench and have discovered something unexpected which I wonder if someone could ...
3
votes
2answers
154 views

what is the better hosting for django?

i need to serve a Django App online, but, what is the best hosting for this Framework? thanks.
3
votes
3answers
745 views

What's the optimal way to set up a Django server to serve multiple sites?

I currently use Apache 2.0 and FastCGI to serve my Django sites (I host multiple sites from a single server / IP). Each site has it's own FastCGI process which stops Apache forking multiple copies ...
3
votes
1answer
319 views

Django + Apache + mod_wsgi: Why is wsgi script executed multiple times?

I'm relatively new to all the server technology and I followed this tutorial to deploy my django app on an Apache Webserver, using mod_wsgi: ...
3
votes
2answers
831 views

Is Amazon EC2 for me?

I'm working on an image hosting website tailored to a particular niche. The website is made with Django. I'm currently planning to run it on Linode. So far so good. The problem is: I will need to ...
3
votes
2answers
1k views

Attempting to run Django with start Apache2 mod_wsgi on Ubuntu Lucid Lynx without success

I have a small vps with a minimum install of ubuntu lucid-lynx with about 256mb memory, it's newly installed with nothing special running on it. I'm trying to deploy django to it, while I'm ...
3
votes
1answer
2k views

Django, wsgi, py. what's the difference?

I'm trying to get a django application up and running on my cpanel system. I've installed mod_wsgi, and am following the guide here: ...
3
votes
1answer
689 views

Serving django with nginx and uWSGI

I followed this post to serve my django project. The project runs well with manage.py runserver and I want to set it up for production. Here are my setting files: nginx.conf: upstream django { ...
3
votes
2answers
3k views

Nginx 502 bad gateway runing django in uwsgi

I tryed to restart a project in production and it stoped working. This is a django==1.5.1 and django-cms==2.4.1 project. I restarted because I've updated the project from django==1.4.1 to ...
3
votes
2answers
731 views

Apache mpm worker + wsgi Python/Django workers stuck

Our Apache+Django server has the problem that workers get stuck. It's an mpm worker model, and after some time, each process that serves some dozen worker threads has all its workers frozen: # ...
3
votes
1answer
252 views

Web Server Routing Based On Location

I have a website that has users from both Hong Kong and Australia. Unfortunately, since the server is located in Australia, users from Hong Kong are going to suffer latency problems. Traffic has to ...
3
votes
1answer
331 views

Should production web servers use a gateway host for SSH in Django apps even though Fabric doesn't support it?

My firm manages a fairly large array of production servers across a number of servers. Our production server, by convention, only allow SSH access from a handful of gateway hosts. Most of these web ...
3
votes
1answer
2k views

virtualenv gcc error MySQL-python

I am trying to install MySQL-python through PuTTY with virtualenv. Specs. *CentOS-6.0 *Python2.6 So I have read many sites and the biggest thing I see is python-dev, and python-devel(btw I don't ...
3
votes
2answers
3k views

Apache : Making one virtual host subdomain/subdirectory of another virtual host

My setup is a bit awkward. I've got http://sub.main.com mapped to my server's IP but not the http://main.com. I am running two sites on my server(using different web frameworks). For each of those ...
3
votes
2answers
3k views

Server Clustering (Django, Apache, Nginx, Postgres)

I have a project deployed with django, Apache, Nginx and Postgres. The project has requirement of live data viewable to customers. The projects main points are: 1. Devices in field send data to ...
3
votes
1answer
681 views

Django site performance problem

my mod_wsgi/django app has ~2s response time with or without memcached in-memory caching. response is the same 2s with or without DNS resolution (i.e. with direct IP request) for comparison, a ...
3
votes
1answer
332 views

psycopg2 not found by django after installing in virtualenv

I want to use postgresql with django so did the following: sudo apt-get install libpq-dev python-dev sudo apt-get update workon myenv sudo pip install psycopg2 And after configuring my settings.py ...
3
votes
1answer
521 views

Deploying a Django application in a virtual Ubuntu Server

I have a virtualbox machine running Ubuntu Server 10.04LTS. My intention is to this machine to work like a VPS, this way I can learn and prepare for when I get a VPS service. Apache+mod_wsgi for ...
3
votes
2answers
969 views

Broken URL rewriting on Django/modwsgi setup

I am trying to setup my Django app to run under Apache with modwsgi. I have defined the following virtualhost: <VirtualHost *> ServerName www.domain.com ServerAlias domain.com ...
3
votes
1answer
790 views

Running fastcgi->php for a blog subfolder, while rest of site is fastcgi->django

Sort of an odd question but should be pretty easy to solve. I am developing a Django website right now and the client wants a Wordpress blog as well. Because we're under the gun and have other ...
3
votes
1answer
644 views

Analyze uwsgi strace log to find out why it takes high CPU usage

I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab ...
2
votes
2answers
847 views

Amazon EC2: Not able to open web application even if port it opened

I have a t1.micro instance with public dns looks similar to ec2-184-72-67-202.compute-1.amazonaws.com (some numbers changed) On this machine, I am running a django app $ sudo python manage.py ...
2
votes
3answers
2k views

Beginner installing first app on EC2 bitnami stack

Beginner question here. Its probably obvious to someone who does this stuff all the time. But I'm having difficulty setting up django running on an EC2 bitnami instance. I setup my server and I'm ...
2
votes
5answers
657 views

Lightweight web server for Django with small workloads

I'm writing a small app in Django that will be used as admin interface for a set of applications usually configured by text files. It won't do much (parse user input, convert db entries into flat ...
2
votes
5answers
342 views

Assuming I am not serving any static content, will I need to move away from Apache?

I currently run Apache + Django. Works great. Many people, especially this thread: Apache vs nginx vs lighttpd? Which is simpler to configure and administer? say that nginx/cherokee is the newer, ...
2
votes
5answers
5k views

Postgres used in Ubuntu 12.04

I am trying to get django running on an ubuntu 12.04 release using postgres (clean install). To get it running it used to be that you would have to edit the /etc/postgresql/9.1/main/pg_hba.conf file. ...
2
votes
2answers
636 views

my first “production” debian server configuration

I have been using Debian for a year, mostly as the distro for my internal company server. Now I am making a public e-commerce website and I am planning to use a dedicated Debian server at a datacenter ...
2
votes
2answers
773 views

Debugging nginx URL rewrite: How do I figure out where the problem is?

I have a specific URL pattern on a site which needs to be redirected to the HTTPS version. This is a Django site; Nginx checks each URL in memcached, and if it doesn't find a cached version it proxies ...
2
votes
3answers
543 views

Logging doesn't work after rsyslog upgrade

I have several different django applications under apache on a Red Hat server. These applications use SysLogHandler for sending log messages to the local rsyslog service. In order to pipe log messages ...
2
votes
1answer
927 views

How to reduce celeryd memory consumption?

I'm using celery 2.5.1 with django on a micro ec2 instance with 613mb memory and as such have to keep memory consumption down. Currently I'm using it only for the scheduler "celery beat" as a web ...
2
votes
1answer
357 views

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 ...
2
votes
2answers
367 views

Any way to change the default umask for Apache2?

When Apache writes new files (static content, like writing to the cache file) it creates this file without the proper permissions. There's no write permission for the group by default and this causes ...
2
votes
1answer
2k views

Apache2 mod_wsgi python 2.6 Django very slow

I've tried about 1000x things, but I can't seem to figure out why a simple django website is slow using apache 2.2.14/wsgi latest / django 1.3. I've confirmed the problem isn't our database by turning ...
2
votes
2answers
295 views

Django-Mailer won't stop sending emails

I set up Django Mailer and added the two commands to the crontab: * * * * * root python /srv/www/cpm/manage.py send_mail >> /srv/www/cpm/cron_mail.log 0,20,40 * * * * root python ...
2
votes
1answer
2k views

Fine tuning Django Apache mod_wsgi

First off I am looking for some help setting up my Django and Apache settings to fine tune it for my site for the best performance cost effectiveness. Server info: Django 1.3 Webfacion server, 80mb ...
2
votes
2answers
2k views

Make mod_wsgi use python2.7.2 instead of python2.6?

i am running Ubuntu 10.04.1 LTS and it came pre-packed with python2.6 but i need to replace it with python2.7.2. (The reason is simple, 2.7 has a lot of features backported from 3 ) i had ...
2
votes
2answers
977 views

Apache : Map one virtualhost to a subdirectory of another virtualhost

I'm trying to map one virtual host to a subdirectory of another virtual host, something like this http://host2.com -> http://host1.com/host2. At this moment, whenever I go to http://host2.com it ...
2
votes
4answers
2k views

Deploying django under a sub-URL with Nginx/Fastcgi

I can't for the life of me figure out how to deploy a django site under a non-root location with Nginx/fastcgi, e.g. localhost:8080/myproject/ instead of localhost:8080/; all the examples I have seen ...
2
votes
1answer
1k views

Using gentoo, how does one stick -9999 ebuild to a specific svn revision?

As an example given the django-9999 ebuild, to match a developer's environment I need to checkout R12120 from trunk. Installing Django manually is not an option due to package management reasons. But ...
2
votes
1answer
2k views

django mod_wsgi memory problem

I have my django application on a VPS server (128mb ram) When i start it with python manage.py runserver, it works perfectly, but if I try to use it over apache/mod_wsgi it causes major slowdown very ...
2
votes
2answers
920 views

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 ...
2
votes
1answer
553 views

Running multiple Django projects within Apache, sys.path being over written

I have been trying to research how to do a multiple Python / Django deployment using Apache VirtualHosts. The issue I am encountering seems straight forward, ImportError: Could not import settings ...
2
votes
2answers
200 views

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 ...
2
votes
1answer
866 views

Django syncdb can't connect to MySQL on seperate EC2 Instance

I am trying to deploy a django app on AWS with a setup where I have one EC2 instance that is running nginx/uwsgi and a second EC2 instance where I have MySQL 5.5 installed. Both belong to the default ...
2
votes
1answer
256 views

Apache, mod_wsgi, Django Error When Not SSH'd In To Server

I'm getting some strange errors that I've worked through to this point. I have an Ubuntu server setup with Apache + mod_wsgi + Django. When I'm SSH'd into the server, I can access the website fine ...
2
votes
1answer
1k views

apache+mod_wsgi configuration for django project(s) on a quad core

I've been experiment quite some time with a "typical" django setting upon nginx+apache2+mod_wsgi+memcached(+postgresql) (reading the doc and some questions on SO and SF, see comments) Since I'm still ...
2
votes
1answer
3k views

Nginx + uWSGI + Django performance stuck on 100rq/s

I have configured Nginx with uWSGI and Django on CentOS 6 x64 (3.06GHz i3 540, 4GB), which should easily handle 2500 rq/s but when I run ab test ( ab -n 1000 -c 100 ) performance stops at 92 - 100 ...
2
votes
1answer
815 views

gevent with Django as daemon

I've been developing an app using django_socketio (a python port of the Node equivalent), which relies on gevent. It ships with a Django management command that runs gevent's pywsgi server, but that ...