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
2
votes
1 answer

Django LDAP - How to map description field to Django group

I'm trying to set up LDAP authentication with my Django app using Django-Auth The basic idea I want to do is any LDAP user with "IT - Help Desk" in the description would get mapped to a certain Django group, a user with "Admin" in the description…
Greg_the_Ant
  • 489
  • 7
  • 26
2
votes
2 answers

Getting a "403 access denied" error instead of serving file (using django, gunicorn nginx)

Getting a "403 access denied" error instead of serving file (using django, gunicorn nginx) I am attempting to use nginx to serve private files from django. For X-Access-Redirect settings I followed the following…
Finglish
  • 135
  • 1
  • 1
  • 7
2
votes
2 answers

Python: ImportError: No module named os

error_log ... [Fri Sep 07 16:30:14 2012] [error] import os [Fri Sep 07 16:30:14 2012] [error] ImportError: No module named os -shell- [root@lts5srv1 home]# ldd /root/epd-5.1.0/bin/python libpython2.5.so.1.0 =>…
Kreshnik
  • 145
  • 1
  • 3
  • 9
2
votes
1 answer

What's the best way to run Drupal and Django sites behind the same Varnish server?

I have a high traffic website running with Drupal and Apache, five web servers behind a Varnish server load balancing. Let's say this site is example.com. I'm using five backends and a director like this in my default.vcl: director balancer…
Mentakatz
  • 131
  • 7
2
votes
1 answer

Django syncdb can't connect to MySQL on seperate EC2 Instance

I am trying to deploy a django app on AWS with a setup where I have one EC2 instance that is running nginx/uwsgi and a second EC2 instance where I have MySQL 5.5 installed. Both belong to the default group ( enabled SSH, HTTP, HTTPS and MYSQL).…
Binary Maze
  • 233
  • 5
  • 11
2
votes
1 answer

How can I prevent postfix from sending thousands of emails?

I have a Django installation that is configured to email administrators (five of us) whenever an error occurs. All of the generated emails are directed to postfix and then on to the mail server for distribution. Unfortunately, we encountered an…
Huuuze
  • 121
  • 2
2
votes
1 answer

How can I optimize system resource usage for many different gunicorn powered Django sites with low traffic?

My server is a Linode with 768MB of RAM. It is home to around 8 small, low traffic Django sites powered by Nginx, Supervisor, and Gunicorn. Currently, each site has its own Linux user account, with the site's files in the home directory of the…
davidscolgan
  • 395
  • 2
  • 12
2
votes
1 answer

UWSGI, Django, nginx cookie issue - causes 405 Error

I'm running django via uwsgi and nginx, and whenever my app tries to set a cookie, nginx displays a 405 error. The app works fine with apache, runserver or gunicorn, and uwsgi serves it normally except for the redirect problem. I'm running uwsgi…
Greg
  • 239
  • 1
  • 12
2
votes
1 answer

django, mod_wsgi, MySQL High CPU - Problems

I am having a problem with an OSQA site. It is Django/Apache/mod_wsgi configured site. Every hour, the CPU spikes to 164% (Average) for task HTTPD. After 10 minutes, it frees back up. I have reviewed the logs, cron tables, made many config changes,…
Red Rover
  • 31
  • 3
2
votes
2 answers

Nginx - when tunnel the url redirects without port number

My problem is very similar to this: nginx proxy pass redirects ignore port I am using nginx 1.0.14. I want to be able to ssh-tunnel into my Django website, so I can work remotely. I've tested a simple Django project on my personal computer, with…
CppLearner
  • 787
  • 3
  • 10
  • 24
2
votes
5 answers

Postgres used in Ubuntu 12.04

I am trying to get django running on an ubuntu 12.04 release using postgres (clean install). To get it running it used to be that you would have to edit the /etc/postgresql/9.1/main/pg_hba.conf file. However when I look at this release there is no…
2
votes
1 answer

Apache with nginx front-end takes gets pegged 100% CPU with Django app

I recently launched a web app that gets constantly pegged at 100% CPU. My server is a 512 MB Linode with nginx sitting in front of Apache (MPM Worker) serving a Django app. This app is unusual in that it has to do heavy database processing < 5% of…
mathew
  • 213
  • 2
  • 7
2
votes
1 answer

Apache, mod_wsgi, Django Error When Not SSH'd In To Server

I'm getting some strange errors that I've worked through to this point. I have an Ubuntu server setup with Apache + mod_wsgi + Django. When I'm SSH'd into the server, I can access the website fine from a browser on a different machine, and…
2
votes
2 answers

Any way to change the default umask for Apache2?

When Apache writes new files (static content, like writing to the cache file) it creates this file without the proper permissions. There's no write permission for the group by default and this causes problems for us. Can we change the umask that…
Ted LeRoy
  • 41
  • 1
  • 4
2
votes
2 answers

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 following settings: BROKER_HOST =…
Guy
  • 131
  • 1
  • 5