Questions tagged [django]

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.

1012 questions
4
votes
2 answers

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 directory for serving up static content however a…
Lee
  • 145
  • 1
  • 12
4
votes
1 answer

Python, "you don't have permission to access that port"

I'm setting up my first Django project on a server When I do python manage.py runserver .0.0.0.0:80, it tells me You don't have permission to access that port. When I do python manage.py runserver .0.0.0.0:8000 it tells me that the port is already…
user173757
4
votes
2 answers

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 django==1.5.1, but as long as I know it doesn't change…
Mauricio
  • 233
  • 1
  • 3
  • 8
4
votes
2 answers

How can I run two Django versions in the same server?

i've got two web apps. One was developed using Django 1.0 and the other using Django 1.4. How can I run both apps in the same apache2 server using two versions of django? Somebody told me something about virtualenv ... I'm using mod_wsgi. Thanks
Liam
  • 241
  • 4
  • 10
4
votes
4 answers

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…
organicveggie
  • 1,071
  • 3
  • 15
  • 27
4
votes
3 answers

Django: Nginx with WSGI or Apache with WSGI

Are there any studies comparing the performance (RPS, CPU, Memory usage etc) of delivering python web apps (Django in my case) between nginx and Apache? Can someone help me with facts? Which combination would you recommend?
Quintin Par
  • 4,373
  • 11
  • 49
  • 72
4
votes
1 answer

HAProxy URL Introspection

I have an application where the URL of a request determines which server to forward the request to based on a memcache or database lookup. Currently, it is just round robin, but the state is only stored on one server and that server needs to get all…
Matt Williamson
  • 323
  • 2
  • 4
  • 10
4
votes
1 answer

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 working great. Nonetheless, I will need to restart…
philipk
  • 143
  • 2
  • 6
4
votes
3 answers

Way to configure apache for ~125 django sites to optimize memory usage (mod_python v mod_wsgi; worker vs prefork; static files)

I'm currently running 125 Django sites on a single dedicated box at GoDaddy. The sites are relativelly low traffic and I'm wondering what i can do to optimize the memory usage in my apache config. Before I tuned the prefork directives to a lower…
user8550
4
votes
3 answers

What port should I use for my reverse proxy to Apache 2 from nginx?

I have nginx setup as the defacto port 80. I want to setup django+mod_wsgi on Apache2. I'm worried if I leave Apache2 as 80 it will cause a conflict. Is it better to avoid the headache and change Apache to a different port? server { listen 80; …
meder omuraliev
  • 1,721
  • 3
  • 21
  • 30
4
votes
3 answers

Nginx fastcgi problems with django (double slashes in url?)

I'm deploying my first django app. I'm familiar with nginx and fastcgi from deploying php-fpm. I can't get python to recognize the urls. I'm also at a loss on how to debug this further. I'd welcome solutions to this problem and tips on debugging…
reconbot
  • 2,455
  • 3
  • 25
  • 30
4
votes
1 answer

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 there is also no ebuild in portage for 1.2 beta…
hurikhan77
  • 477
  • 3
  • 9
  • 23
4
votes
1 answer

Error: could not determine PostgreSQL version from '11.7'

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git I have the following Dockerfile: FROM python:2 ENV PYTHONUNBUFFERED=1 WORKDIR /code COPY…
user977828
  • 225
  • 1
  • 6
  • 15
3
votes
1 answer

uWSGI can't load config in Docker

I have a weird problem, which is probably related to my Dockerfile, but I fail to see it - I've tried different settings, but nothing helps. Here is my uwsgi.ini file: [uwsgi] strict = true socket = 0.0.0.0:8000 protocol = http module =…
Djent
  • 99
  • 2
  • 6
  • 16
3
votes
1 answer

How to debug Django/WSGI/Apache errors

I have a Django 1.11.17 application deployed on Apache 2 and WSGI, Python 2.7. Apache shows an error "Truncated or oversized response headers received from daemon process" I have checked the solution given in WSGI : Truncated or oversized response…