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
12
votes
6 answers
Is there a Heroku for Django?
I've been looking into Heroku as a hosting provider. I'm specifically interested in its ease of deployment and ability to scale up and scale down resources as needed.
Is there a hosting solution with this type of ease and power that works with…
![](../../users/profiles/45067.webp)
Chris Dutrow
- 725
- 7
- 19
11
votes
1 answer
Risks of using django manage.py runserver for production in a small scale server, for internal use?
I am writing a small web-app with django. It will have no more than 200 users, all internal to my company. I want to set it up as quickly as possible. I am new to django and web-apps.
As I read django's tutorial, they don't recommend using python…
![](../../users/profiles/134848.webp)
becko
- 263
- 4
- 10
11
votes
1 answer
Storing username in nginx logs
Is there a way in which user-name or user-id can be stored in nginx logs. I tried inserting $remote_user in the log_format directive but it doesn't seem to work.
![](../../users/profiles/225649.webp)
nishant
- 113
- 1
- 4
11
votes
3 answers
How to set up Django with IIS 8?
I have tried in the past to get Django running under IIS 8 in Windows 8 Developer Preview. Now that the Consumer Preview of Windows 8 is out, I was wondering if I could get some detailed instructions on setting up Django within IIS.
How do I go…
![](../../users/profiles/30745.webp)
Nathan Osman
- 2,705
- 7
- 31
- 46
11
votes
5 answers
Amazon EC2 Ami recommendations for free tier?
Amazon web services recently introduced a free tier, where you basically get free stuff to try out AWS and run tiny sites and projects. Basically it's free as long as you remain below a certain limit of bandwidth, disk storage etc.
Since going over…
![](../../users/profiles/4974.webp)
Console
- 447
- 1
- 6
- 11
10
votes
4 answers
nginx + fastCGI + Django - getting data corruption in the responses sent to the client
I am running Django behind nginx using FastCGI. I have discovered that in some of the responses sent to the client, random data corruption is occurring in the middle of the responses (might be a couple hundred bytes or so in the middle).
At this…
![](../../users/profiles/72701.webp)
glenc
- 263
- 1
- 7
10
votes
2 answers
High CPU load on Django/Apache/mod_wsgi site
Load testing a django 1.21/Apache/mod_wsgi configuration on an AWS small instance (Ubuntu 10.04) with Apache bench is showing extremely high CPU load (using uptime and vmstat) at low concurrent requests:
ab -c 5 -n 1000 "my_url"
...causes this…
![](../../users/profiles/54696.webp)
litterbug
- 121
- 1
- 4
9
votes
3 answers
How to explain Django/Python installation to Python-newbie running a shared IIS server
For reasons beyond my control, our website is hosted with a hosting provider that uses IIS for their servers. They currently offer PHP and ASP, and also Python and Perl through cgi-scripts.
I want to do a re-design, re-write of our website, and want…
![](../../users/profiles/393.webp)
Epcylon
- 217
- 4
- 10
9
votes
1 answer
uWSGI Returning Empty Response
I have a Django site which I am trying to server via uWSGI. I have started the server like so:
uwsgi --emperor .
Ctrl+Z
bg 1
(There are two .ini files which point to the test version and production version of the site, serving on 9001 and 9002…
![](../../users/profiles/2143.webp)
d4nt
- 265
- 3
- 9
9
votes
1 answer
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 them. But once everything was working I decided to…
![](../../users/profiles/115688.webp)
Bastian
- 263
- 3
- 13
9
votes
1 answer
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**
...
Apr 13 11:47:11 www3 apache2[24032]: [error]…
![](../../users/profiles/849.webp)
Chase Seibert
- 543
- 5
- 11
8
votes
4 answers
How to set environment variables for the CI/CD in GitLab when using Auto DevOps (with GCP Kubernetes)?
I'm having quite a few moving parts here, so, I'm not sure what's wrong yet. I set up my variable this way:
but during the build phase, I get this failure (it's a Django application):
raise ImproperlyConfigured("The SECRET_KEY setting must not…
![](../../users/profiles/2563.webp)
Pablo
- 7,249
- 25
- 68
- 83
8
votes
1 answer
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 correctly, I run
./manage.py syncdb
But an…
user236239
8
votes
5 answers
Why do I get error, Invalid command 'PythonHandler'?
I'm trying to deploy a Django application, but I've hit a brick wall. On Debian (latest), I've run these commands so far:
apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-python…
![](../../users/profiles/17170.webp)
Nick Bolton
- 5,016
- 12
- 51
- 62
8
votes
4 answers
gunicorn + django + nginx unix://socket failed (11: Resource temporarily unavailable)
Running very high volume traffic on these servers configured with django, gunicorn, supervisor and nginx. But a lot of times I tend to see 502 errors. So I checked the nginx logs to see what error and this is what is recorded:
[error] 2388#0:…
![](../../users/profiles/112193.webp)
user1068118
- 81
- 1
- 4