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

Chris Dutrow
- 734
- 8
- 20
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…

a06e
- 353
- 1
- 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.

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…

Nathan Osman
- 2,725
- 7
- 32
- 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…

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…

glenc
- 273
- 1
- 8
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…

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…

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…

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…

Bastian
- 283
- 3
- 16
9
votes
2 answers
nginx not serving admin static files?
Clarification: The following error is onlyfor the admin static files, i.e. it is specific to the static files corresponding to the Django admin. The rest of the static files are working perfectly.
Problem
Basically, I cannot access the admin static…

toto_tico
- 191
- 1
- 1
- 6
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]…

Chase Seibert
- 543
- 5
- 11
9
votes
3 answers
Invalid HTTP_HOST header. The domain name provided is not valid according to RFC 1034/1035
I am getting Invalid HTTP_HOST header error on my server. I don't understand why it's happening and how to fix it. Everytime it happens backend stops working and I have to restart the server.
Any help will be appreciated.
Thanks in advance!
FYI…

Chetan Ganji
- 93
- 1
- 1
- 3
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…

Pablo Fernandez
- 7,438
- 25
- 71
- 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