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
4
votes
1 answer
IIS and SQL Server Windows authentication in a django application
I am trying to run a django website which connects to a SQL Server, using IIS with Windows authentication.
IIS server and SQL server are on different machines under the same domain i.e., iis_machine.example.com and sql_machine.example.com
What I'm…

notarobot
- 41
- 1
- 6
4
votes
1 answer
Django VPS Configuration
I'm looking to run some Django sites on my VPS, with nginx acting as a front-end for it. I've been having some issues with mod_python and Apache, the site just starts erroring out whenever the traffic starts to pick up because it just uses so much…

Zack
- 151
- 4
4
votes
1 answer
No socket created by Gunicorn causes nginx to throw 502 error
Following this tutorial, I was able to set up Django, Gunicorn & nginx inside a virtualenv on an AWS EC2 instance (running Ubuntu 16.04), and then proceed to create an Upstart file to "daemonize" the entire thing.
After activating the virtualenv, I…

Tom Granot
- 183
- 1
- 10
4
votes
0 answers
Prevent Gunicorn from loading slowly after an inactive period?
My Django project is running on gunicorn. Sometimes loading a page (and oracle procedures calls related) takes a lot of time. This occurs 90/100 when the server remains inactive for some minutes.
How can I approach to this problem?
wsgi.py
import…

Sam
- 151
- 4
4
votes
4 answers
Nginx: 502 Bad Gateway error with (111: Connection refused) to uWSGI socket while running django
I am building an app using an Nginx, uWSGI, Django and Postgresql stack. The app uses a Unix socket between Nginx and uWSGI. The file permissions on the socket is 775. But I still get this permission error:
[error] 6978#0: *6725 connect() to…

user2901792
- 141
- 1
- 1
- 3
4
votes
1 answer
Postgresql Error: could not receive data from client: Connection reset by peer
I try this stack: nginx + uwsgi + django + postgresql, the request can reach to views of django, client show 500 server internal fault, I check postgres log, found the error could not receive data from client: Connection reset by peer. How to debug…

attolee
- 151
- 1
- 4
4
votes
3 answers
Scheduling tasks with Django
I have a Django website, and I want to have a certain piece of Python code run at regular intervals. What would be a good way to do that?
I know I can cron, but I would prefer the solution to be within Django.
I know there's a module called celery…

Ram Rachum
- 5,231
- 7
- 34
- 46
4
votes
2 answers
Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi
I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of recommendations for lighttpd and fastcgi. Is this setup faster…

BrainCore
- 161
- 1
- 3
4
votes
1 answer
Trouble with Uwsgi settings
I have a uwsgi ini that looks like this:
[uwsgi]
socket = :8001
processes = 4
master = true
wsgi-file = /project/dev/myproject/conf/deployment/wsgi/dev/myproject-site.wsgi
harakiri = 30
daemonize = /logs/log/myproject/myproject-uwsgi.log
uid =…

James R
- 141
- 1
- 2
4
votes
2 answers
aws ec2 and Django ALLOWED_HOSTS
I have put in place my website using Django, on aws EC2, using Elastic Beanstalk. I have set the ALLOWED_HOSTS to ['www.mydomain.fr', '.mydomain.fr'], as recommanded on the Django website.
But I received a lot of alerts like :
Invalid HTTP_HOST…

trnsnt
- 133
- 2
- 6
4
votes
1 answer
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 projects as well, we don't have time to build a nice…
whalesalad
4
votes
2 answers
Which Linux distro should I use for Apache, mod_wsgi, Python, Django, PostgreSQL deployment?
Currently we are running CentOS for our production servers. Wer're deploying Django projects with Apache 2.2, mod_wsgi and PostgreSQL.
We are in the process of making Python 2.5 the default version. However, this version is not in the standard…

Bram
- 51
- 3
4
votes
1 answer
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 {
server /tmp/vc.sock;
#server…

Terry
- 45
- 1
- 4
4
votes
1 answer
Trying to run gunicorn from supervisor gives error - error: class uri 'simple' invalid or not found
I am already running successfully 2 django projects (in same virtualenv with python 2.7) with Django + gunicorn + virtualenv + Supervisord environment. But now i am trying to run another project in python 3.2.3 so i created another virtualenv. but…

Muhammad Tahir
- 149
- 4
4
votes
0 answers
Ubuntu Locales Incorrect for Python Application
I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the Django App (Mezzanine) is
Access was attempted…

OpIvy
- 113
- 1
- 1
- 5