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

learn more… | top users | synonyms

1
vote
0answers
18 views

How do I configure nginx to have a server block pointing towards a django app?

Suppose I have an nginx server, with Django apps set up as "/djangoapps/exampleapp1/" and "/djangoapps/exampleapp2/". Suppose I just registered a domain "www.exampleapp2.com". How can I point ...
0
votes
0answers
13 views

uWSGI reload not picking up new code changes

I've setup a server with nginx and uWSGI to server a django application. I deployed some changes to the server this morning which weren't picked up so I assumed my reload method wasn't working - sudo ...
0
votes
1answer
37 views

access server with ip address and not server name

I am trying to access my server to the following address: https://www.media-rewards.com/ But it doesn't work :(. However, if I use its ip address, it works: https://52.0.245.209/ I don't know ...
0
votes
1answer
37 views

Django mail reports blocked by Gmail

I configured my Django 1.6 framework to send error reports to a Gmail account so I can check them. Before this worked well, though I had to define filters to catch the sender mail addresses I ...
0
votes
0answers
36 views

How to use ssl everywhere except an endpoint

I have a Web site where I want all requests to be done with HTTPS except for requests to urls with paths that start with /out/. nginx is configured as proxy to serve gunicorn/django content from ...
0
votes
1answer
34 views

MySQL spends too much time cleaning tmp tables

I'm running some Django migrations on an AWS RDS MySQL instance. My team has tested the migrations very thoroughly and they ran fine (even taking less than 30 minutes when run on our laptops against a ...
0
votes
0answers
30 views

uWSGI backtrace: semgentation fault errors

I'm getting the following backtrace in my uWSGI logs, I don't know where to begin looking to figure this out: DAMN ! worker 5 (pid: 29056) died :( trying respawn ... Respawned uWSGI worker 5 (new ...
1
vote
1answer
59 views

AWS, Nginx, and Django: default server to prevent bogus host strings

We have a server setup with AWS that must satisfy the following requirements: 1: Incoming requests originating from the load balancer (specifically, health checks and latency checks) must be allowed ...
0
votes
0answers
27 views

Django/Tastypie: RDS is damn slow compared to EC2-MySQL

Initially my setup was: EC2 (Apache -> Django -> Tastypie) -> MySQL on EC2 itself. One of our API (Tastypie) does almost 80 SQL SELECT queries to fetch related resources and attributes. For local ...
0
votes
0answers
46 views

How to deploy in amazon ec2 through bitbucket

I have a django project and have my repository in bitbucket and locally (windows 7). Now I want to deploy the changes to amazon ec2 instance (ubuntu 14.04) by doing git push and git pull. I did git ...
0
votes
1answer
50 views

Seeking advice on performance metrics based on NewRelic dashboard

Some background: I have been given access to our newrelic dashboard for the production servers running a django app on an AWS account, and tasked to come up with some gatling.io (performance testing ...
0
votes
0answers
33 views

Uwsgi many many (zombie?) threads when crawlbot is on site

I'm running a django application with nginx/uwsgi. It has multiple domains, about 15. What I've noticed is that sometimes the performance starts getting really bad. Then when I run ps aux -T | grep ...
0
votes
1answer
135 views

virtualenv Failed to map segment from shared object: Permission denied

When SELinx is in permissive the Django webapp runs fine with no alerts. The below error appears in the Apache error log, once SELinux is set to enforcing, but, still, not alerts are logged to ...
1
vote
3answers
210 views

Ubuntu upgrade broke django mod_wsgi

I'm banging my head here and can't seem to find the answers anywhere. My server is running Ubuntu 14.04. I run several django sites using apache and mod_wsgi Today after an update, the sites will ...
3
votes
1answer
126 views

gunicorn not fully reloading after an HUP signal

I'm trying to get a working supervisor/gunicorn/django setup on vagrant. I am using python-watchdog to try and restart gunicorn when code changes happen. I am using the following supervisor ...
2
votes
2answers
581 views

Nginx & uWSGI: ImportError: No module named site

I'm receiving an error: ImportError: No module named site according to my uWSGI log. test_proj.ini: [uwsgi] chdir = /home/%n/app module = %n.wsgi home = /home/%n/app/venv master = true processes = ...
0
votes
1answer
245 views

configure nginx for serving django development static files

I am using Nginx to serve static files on django development server. However I can't make it work. The server runs fine but nginx is not able to find static files. This is my settings in nginx.conf: ...
0
votes
0answers
24 views

“Error importing middleware” on osqa

I installed osqa with postgresql as backend on ubuntu 14.0.4 using the tutorial below http://wiki.osqa.net/display/docs/ubuntu+12.04,+django+1.3,+mod_wsgi,+virtual_env,+postgresql which asks to ...
0
votes
0answers
50 views

Scale automatically by monitoring the load in app server

I have a regular setup with 4 droplets in DigitalOcean. One for Haproxy as load balancer, two for app servers, run same Django application and one for database. It's quite easy to add another app ...
1
vote
0answers
128 views

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 = ...
0
votes
0answers
209 views

Apache not serving my python app

So here's my apache config: LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so <VirtualHost *:80> ServerAdmin marijus.merkevicius@gmail.com ServerName 31.220.49.197 ...
0
votes
1answer
95 views

Docker: Django and Postgresql: What is better two separate containers or one?

I plan to deploy my django app in docker. This application uses Postgresql as backend, so I've faced a question, what is better deployment scheme: two docker containers - one for app and one for DB, ...
0
votes
0answers
29 views

scrapping not working Django+Apache+wsgi Production server

I developed a django app which uses beautifulsoup4 and urllib2 to parse the data from webpages.It was working well on my development server but when I put the same on Apache+wsgi server, the scrapping ...
0
votes
0answers
63 views

Tuning and configuring Django Application with Apache & Mod Wsgi

We are running Django Application using Apache+mod-wsgi. application is taking too long to load. even a single list view page load takes 6-15 seconds. Can you suggest improvements? Provided are my ...
2
votes
1answer
197 views

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 ...
0
votes
0answers
33 views

Elasticsearch service automatilly terminates

When i try to start the elasticsearch service, it starts normally (no error messages). But terminates immidiately. There is no log in the /var/log/elasticsearch directory.I'm using elasticsearch ...
1
vote
1answer
37 views

API and main page as two separated processes

SITUATION I created an REST API for my mobile application and now I want to create a website. API so far is very very simple, just for a couple requests like 'get list of contents', 'update some ...
0
votes
1answer
248 views

Strange behavior with supervisor, gunicorn and Django

I have a really strange problem with supervisor and gunicorn. I read supervisor documentation, all the relevant blog posts, stackexchange questions but none of them solve my strange problem, and I ...
0
votes
1answer
25 views

Django and phpBB server [duplicate]

Is it possible to integrate Django web site and PHP forum by some apache directive in httpd.conf file? For example: <VirtualHost *:80> ServerName myserver DocumentRoot home/myserver/www/ ...
2
votes
1answer
299 views

Django: CONN_MAX_AGE persists connections, but doesn't reuse them with PostgreSQL

I've got a django setup are using Django 1.6.7 and Postgres 9.3 on Ubuntu 14.04 LTS. At any given time, the site gets about ~250 simultaneous connections to the PostgreSQL database, which is a Quad ...
0
votes
1answer
52 views

AWS EC2 Ubuntu - Logging Python print statements

What is the easiest way to see "print" statements made when a Python file is executed on my AWS EC2 Ubuntu server? I have tried the aws cli, but this does not work for me.
0
votes
0answers
60 views

Why use daemon mode of mod-wsgi with apache mpm-worker

I am trying to tune my server which hosts a django app using mod-wsgi on an apache web server. I have been reading some resources on using mod-wsgi with apache2 and beyond a certain point things are ...
0
votes
0answers
63 views

Diagnosing Random Internal Server Errors That Leave Clean Logs

I have a Django site running on an Amazon EC2 Ubuntu instance, and I've been getting random Internal Server Errors that I can't get to the bottom of. I'm using Apache 2.4.10 to serve pages. I also ...
0
votes
1answer
433 views

Django, mod_wsgi, pyvenv-3.4 - configuration

I'm trying to deploy my first, simple django website. I have an VPS with Ubuntu 14.07 Server, Apache 2.4.7 with mod_wsgi. So, i added this vhost: <VirtualHost *:80> ServerName api.XXX.net ...
0
votes
1answer
105 views

Serving a static page using nginx - getting 404

I'm trying to set up a static page on my website using nginx. The folder has a index.html file along with some static files. The directory structure looks something like this olx --static --fonts ...
0
votes
1answer
376 views

How to reinstall python2.7 on CentOS 6 in order to install mod_wsgi [closed]

I've installed Python2.7 from source on a CentOS 6 VPS, and I'd like to get a Django site up and running. Unfortunately, everything I've Googled so far says that I'll need to install mod_wsgi, which ...
0
votes
0answers
93 views

Cache-Control only working for media files and not static files served in Django

I'm trying to use Cache-Control for my static files. Following is my code for the .htaccess file # 1 YEAR <FilesMatch "\.(ico|svg|woff|eot|ttf)$"> Header set Cache-Control "max-age=31536000, ...
0
votes
0answers
33 views

Webserver needed for django WSGI API?

My app is just a REST API written in django. There is no static content or html pages served. In setting up our production environment, we are planning on using amazon ELB (load balancer) to balance ...
0
votes
0answers
183 views

Running Django Test Server - Segmentation fault (core dumped)

I am running the Django test server from a virtualenv - necessary to use supervisord to run Celery as a background process. When I try: "python manage.py runserver" from the cygwin shell I get the ...
0
votes
0answers
75 views

Django-mailer emails stuck in queue

I have been using the Django-Mailer app for a few years on my large, corporate Django driven web application. I use it to send a custom email to each of our 800 clients. Generally, it has worked well. ...
0
votes
1answer
227 views

nginx wont start after reboot Ubuntu 14.04

I'm getting this error: nginx: [emerg] duplicate upstream "app_server" in /etc/nginx/sites-enabled/django.save:1 this is my config file: upstream app_server { server 127.0.0.1:9000 ...
1
vote
1answer
162 views

Nginx and Django use www-prefixed domain

Trying to understand how to force www. in my domain and redirect anything like ww.example.com or test.example.com -> www.example.com Everything works fine when I go to www.example.com or example.com, ...
-1
votes
1answer
212 views

503 errors on Apache+Mod_wsgi+Django

I'm new to Python and trying to setup Django on my VPS that is running CentoOS 6.5. My Apache version is 2.2.15. Python is running on version 2.7. I created a virtualenv under ...
0
votes
0answers
29 views

Nginx blocks http response with long string

I encountered a issue with my live web service today. The backend setup is Nginx + Django webservice. In the webservice, I have code to return a HttpResponse with a long JSON string (> 1400 char). ...
1
vote
1answer
1k views

Graphite SQLite3 DatabaseError: attempt to write a readonly database

Running graphite under apache httpd, with slqite database, I have the correct folder permissions [root@liaan55 httpd]# ls -ltr /var/lib | grep graphite drwxr-xr-x. 2 apache apache 4096 ...
0
votes
1answer
411 views

How to serve static files for multiple Django projects via nginx to same domain

I am trying to setup my nginx conf so that I can serve the relevant files for my multiple Django projects. Ultimately I want each app to be available at www.example.com/app1, www.example.com/app2 ...
0
votes
2answers
162 views

Repeated EC2 Apache 500 error

I'm running a Django website off Apache and MySQL. I'm using a t1.micro instance. After every couple of days, my server starts giving a 500 error. I solve this problem by restarting the Apache2 and ...
0
votes
2answers
139 views

Why do I see apache's 404 and not Django custom 404?

On my local django runserver I created a custom templates/404.html, and this works no problem. However in production with apache this custom 404.html is no longer shown (even with DEBUG=False). I ...
4
votes
1answer
926 views

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 ...
2
votes
0answers
153 views

Not seeing Django logs on Heroku

I'm not seeing log entries (at a level of INFO) made by Django in my Heroku logs. This is my configuration: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { ...