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

0
votes
1answer
3k views

Error code: ssl_error_rx_record_too_long on nginx ubuntu server

I have a site which was perfectly running with apache on some old ubuntu server and also has https for it. But now for some reasons i need to move to different(new ubuntu server with high ...
0
votes
1answer
940 views

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 ...
1
vote
1answer
31 views

nginx suspicious symbols warning in my nginx config file

My nginx configuration file is given below. server { listen 80; server_name http://hg.rawdatatech.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; ...
1
vote
1answer
911 views

Debugging Gunicorn + Nginx + Django

I'm trying to deploy a readthedocs instance on my own server. The recommended way to deploy is using Gunicorn + nginx with postgres. Because there's basically no documentation on how to do this ...
4
votes
2answers
1k views

Deploying Django App with Nginx, Apache, mod_wsgi

I have a django app which can run locally using the standard development environment. I want to now move this to EC2 for production. The django documentation suggests running with apache and ...
2
votes
2answers
1k views

Nginx & uWSGI: ImportError: No module named site

I'm receiving an error: ImportError: No module named site according to my uWSGI log. test_proj.ini: [uwsgi] chdir = /home/%n/app module = %n.wsgi home = /home/%n/app/venv master = true processes = ...
1
vote
2answers
1k views

Django fails to find static files served by nginx

I know this is a really noobish question but I can't find any solution despite finding the problem trivial. I have a django application deployed with gunicorn. The static files are served by the ...
0
votes
0answers
37 views

no module named 'project' in gunicorn using Django 1.8 & python 3.4

I've deployed with ansible a project using Django 1.8 and python3.4 in a virtualenv folder. For my projects including settings and wsgi in a config folder it works, the deployment is fine and it ...
4
votes
1answer
1k views

Gracefully Restarting Django Celery Instances

I'm wondering what the best way to restart Celery is without losing any tasks during the restart. I'm currently running it as a daemon using the init.d/ script provided with celery - everything is ...
1
vote
2answers
1k views

django + wsgi + suexec + userdir + apache?

I've got a django 1.1 website I want to run in wsgi (as that seems to be the recommended deployment on apache). I want it to run as the www user (apache is running as www-data). I would ideally like ...
0
votes
1answer
108 views

Not able to use mysql in google app engine - Error loading MySQLdb module: No module named _mysql. I am using cloudSQL

I am using googleAppEngineLauncher to try mysql connection. It gives the log File "/Users/kakshilshah/Desktop/hope/skeduleBackend/django/utils/importlib.py", line 40, in import_module ...
2
votes
2answers
2k views

UnicodeEncodeError when uploading files in Django admin

Note: I asked this question on StackOverflow, but I realize this might be a more proper place to ask this kind of question. I'm trying to upload a file called 'Testaråäö.txt' via the Django admin ...
2
votes
1answer
1k views

Static file permissions with Nginx, Gunicorn and Django

I attempting to setup a Nginx server up with a Gunicorn WSGI server running Django behind.. The setup all seems to runs except i have a permissions issue. I have setup aliases to /media and a /static ...
2
votes
2answers
1k views

LDAP authentication with Graphite

I have setup Graphite Web 0.9.9 on CentOS 6.2 x86_64 at EC2 and I'm trying to get LDAP authentication to work against 389 Directory Server. I have configured local_settings.py with: USE_LDAP_AUTH ...
0
votes
0answers
11 views

Django cache per request

I tried to use cache_page decorator in my view (developed in Django of course). But I think it works not like I want to. I thought, that this works like a CDN - One user execute a query and than other ...
2
votes
2answers
3k views

Celery daemon as a Ubuntu service does not consume tasks while running from terminal does

On Ubuntu 11.10, I have to issue python tasks from django using celery. I'm currently testing on the same machine but eventually the celery worker should run on a remote machine. django uses the ...
0
votes
1answer
2k views

Error while installing with Python “pip”: Cannot fetch index base URL http://

I am trying to install a local version of ScrumDo for testing. Only then I come to the point in my installation that I have to run: source bin/activate pip install -r requirements.txt I get ...
0
votes
1answer
2k views

503 Error: Service Temporarily Unavailable (Mod_wsgi, Apache, Django)

I followed the tutorial to mount a Djando application on Apache here. The Django project was created under its own directory in /opt. Any suggestions or other tutorials I can use? I reviewed few ...
2
votes
1answer
1k views

Graphite not running

I'm currently trying to install graphite 0.9.9 on a gentoo box using these instructions from the graphite wiki. Essentially, it fronts graphite using apache and mod_wsgi. Everything seems to have ...
1
vote
1answer
1k views

Enabling mod_wsgi in Apache for a Django app on Gentoo

I installed Apache, Django, and mod_wsgi on Gentoo using emerge (on Amazon EC2). I know that the mod_wsgi is configured in /etc/apache2/modules.d/70_mod_wsgi.conf: <IfDefine WSGI> LoadModule ...
0
votes
1answer
19 views

gunicorn behave differently when run from terminal and by service

I am using nginx+gunicorn+django for my website. The following is my gunicorn.conf file: description "Gunicorn daemon for Django project" start on (local-filesystems and net-device-up IFACE=eth0) ...
5
votes
1answer
3k views

Apache/wsgi “Script timed out before returning headers”

I have a custom Django app that's becoming unresponsive roughly every 5,000 requests. In the apache logs, I see see the following: Apr 13 11:45:07 www3 apache2[27590]: **successful view render here** ...
0
votes
2answers
606 views

configure nginx for serving django development static files

I am using Nginx to serve static files on django development server. However I can't make it work. The server runs fine but nginx is not able to find static files. This is my settings in nginx.conf: ...
5
votes
2answers
1k views

Django rewrites URL as IP address in browser - why?

I am using django, nginx and apache. When I access my site with a URL (e.g., http://www.foo.com/) what appears in my browser address is the IP address with admin appended (e.g., ...
1
vote
1answer
324 views

Apache not serving my python app

So here's my apache config: LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so <VirtualHost *:80> ServerAdmin marijus.merkevicius@gmail.com ServerName 31.220.49.197 ...
7
votes
1answer
2k views

Celery Daemon receives unregistered tasks

I installed Celery for my Django project following what the official tutorial / doc says. And it's working fine when I launch celery at the command line, I can see it receiving the tasks and execute ...
0
votes
1answer
1k views

Apache as a reverse proxy not working for gunicorn

My Goal is to let client connect through https connection but apache serve it to my application which is running on same server over http. Here is my minimalistic apache configuration file (for ...
0
votes
1answer
32 views

UWSGI Bad Gateway - Connection refused while connecting to upstream

Trying to get a basic Django app running on nginx using UWSGI. I keep getting a 502 error with the error in the subject line. I am doing all of this as root, which I know is bad practice, but I am ...
-1
votes
1answer
1k views

Internal Server Error when running Gunicorn as a service

I'm trying to deploy my Django app for the first time on a Digital Ocean VPS. I've used their Django droplet which setup things like this except I'm not using a virtual environment. After adding my ...
-1
votes
1answer
1k views

nginx, gunicorn and django weird 504 gateway timeout

I have an nginx / gunicorn / django setup as follows: Nginx server { listen 80; server_name myserver.com; root /www/python/apps/pyapp/; access_log ...
0
votes
0answers
8 views

Filter to exclude root from tracking

This is probably basic, but I'd like to exclude all traffic to root (/) in Google Analytics reporting. This is because I'm using Django and translations, so all traffic to root gets redirected to /en/ ...
0
votes
0answers
13 views

Nginx reduce waiting time on django

My nginx setup is user root; worker_processes 4; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include ...
1
vote
0answers
27 views

No Module Named OS - NGINX/UWSGI/NGINX

Have looked at many related posts and most point to an outdated version of python that is cause the 'no module named os' during the uwsgi boot. I've run print sys.version_info And it shows python ...
0
votes
1answer
22 views

Staticfiles for Django cannot be located on IIS 8

I have a Django 1.7 website configured on IIS 8 platform. The staticfiles are kept in a folder generated after running collectstatic command. As mentioned in the tutorials I have made that folder a ...
0
votes
1answer
27 views

mod_wsgi authorization with Django users from postgres database

I am trying to protect a url path with basic auth and want to use the users from my Django application which are stored in a Postgres database. The user app is allowed to access this database, the web ...
1
vote
0answers
22 views

Django + gunicorn + nginx concurrent users on default configurations [closed]

I am currently setting up nginx+gunicorn to serve a django app that is going to be used by at most 60 users following THIS tutorial. The app is pretty basic, 6 django forms made out of 10 fields and ...
14
votes
2answers
1k views

Why do I need nginx when I have uWSGI

There are many tutorials on how to configure nginx to cooperate with uWGSI when I want to deploy Django application. But why do I need nginx in this kit? uWSGI itself can serve WSGI Python ...
2
votes
3answers
3k 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 ...
0
votes
0answers
19 views

Celery worker timeouts

I'm trying to run a celery worker with each task having a timeout of 30 seconds. However whenever I run celery with the --time-limit option, it simply quits. This is the command I use. python ...
0
votes
0answers
12 views

Django 404'ing on static files

I installed askbot (running through Django 1.5) and the page fails to load static files under /m/ (js and css) returning 404; only the plain page as such is served. The site runs on Apache2, with the ...
0
votes
0answers
99 views

Run shell script as Supervisord subprocess?

I have a Django 1.6.2 application that uses Celery 3.1.7 for asynchronous tasks. I'm starting my Celery workers using Supervisor. So far everything is working well except when I reboot my Debian 7.8 ...
1
vote
1answer
209 views

mod_wsgi not working on Apache 2.4.12 64 bit on Windows 7

I'm running Apache (Haus) 2.4.12 64 bit on Windows 7 64 bit. Python 2.7.9 64 bit is installed. Apache is running flawless if I don't try to load mod_wsgi. I downloaded mod_wsgi.so from this site. I ...
0
votes
2answers
105 views

Python Pip Install fails - Could not build the egg. Also cannot use 1.2.5 because of google cloud sql

I need mysql-python. I get error of could not build egg while installing 1.2.4 Everywhere it says install 1.2.5, which works for me too. But googleAppEngine's app.yaml supports only 1.2.4 ...
0
votes
1answer
60 views

Django process hangs when connecting to database in Apache

I'm having an issue with Djang in Apache. It is running in daemon mode and using worker MPM. The application is mostly a restful API that is serving connections from Mobile devices and external web ...
1
vote
4answers
6k views

Python-devel for python 2.7 on CentOS 6.4

Ok, i want to run django web-application on production VPS. Operation system of the VPS is CentOS. Application code written on Python 2.7. I have already installed Python 2.7 with configured virtual ...
0
votes
0answers
105 views

Django / uWSGI - Nginx giving 502 status code: error.log says “Permission Denied”

I'm trying to setup my Django app to use uWSGI and Nginx. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html I'm on the "Using Unix sockets ...
1
vote
0answers
139 views

Django uwsgi Nginx not serving media files - Django returns 404 status code

I originally posted this on SO but I think it might belong here instead. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html Everything was going ...
0
votes
1answer
71 views

How to have Apache route multiple domains to multiple Django projects?

So i'll start off by explaining my goal. I have multiple domains that I am routing to a simple IP address on my server. I want Apache to route each domain to the appropriate wsgi.py file in its Django ...
0
votes
2answers
72 views

Why is this Nginx setup not caching responses?

I have Nginx sitting in front of gunicorn, which in turn sits in front of a django application. The core question is "Why are my responses not being cached?" However, I'm pretty green at this, so ...
0
votes
0answers
61 views

Django - Health check for AWS ELB

I'm hosting web application on AWS with Nginx 1.6.3 and django 1.7.6 I have ELB in front of EC2 instance and its ping target is HTTP:80/health_check of EC2 instance. Until now, I've checked EC2 ...