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
1answer
18 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
0answers
11 views

django dev server and gunicorn +ngnix different response

I have a Django based web app which performs tasks of ~30sec. If I call the task method using the Django dev server I get the correct result, whose is specifically an XML response. If I call the task ...
0
votes
1answer
19 views
+50

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
0answers
3 views

Idiomatically Handling form.errors In Django [migrated]

I'm just starting with Django and I'm to the point where I'm validating form input. I have some code that basically looks like this: if request.method == 'POST': form = RepairerForm(request.POST) ...
0
votes
1answer
21 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/ ...
1
vote
1answer
32 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
18 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
29 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
21 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
175 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
24 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 ...
-1
votes
1answer
62 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
27 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
19 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
58 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
26 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
52 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
69 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
63 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
15 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). ...
0
votes
1answer
301 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
97 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
67 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
58 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 ...
2
votes
1answer
105 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
38 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': { ...
0
votes
1answer
59 views

Scalable django app, should message queue be located on load balancer or app server?

I've just architected my first scalable backend for a django app, however I put the message queue service (RabbitMQ) on the load balancer machine. I was able to siege some of my API routes with up to ...
0
votes
1answer
391 views

Internal Server Error when running Gunicorn as a service

I'm trying to deploy my Django app for the first time on a Digital Ocean VPS. I've used their Django droplet which setup things like this except I'm not using a virtual environment. After adding my ...
0
votes
1answer
78 views

Apache web server, virtual hosts, sub domains and multiple web frameworks

I have a website www.mysite.com This is the main site and I will be using the Django web framework for the site I also want to have other subdomains such as: https://mail.mysite.com (handled ...
0
votes
1answer
133 views

Jenkins fighting with Django over permissions

I've got a Jenkins/Nginx server running. But I get the error from Django: attempt to write a readonly database So I solved this problem by changing the ownership of the project folder to the ...
0
votes
2answers
101 views

Nginx + Apache mod_wsgi, troubles understanding how to configure servers

I've been trying for too long to set up a development environment on my Ubuntu 12.04. My intention is to set up everything as I'd have to do later in a production environment, so I followed this ...
0
votes
0answers
54 views

Django wsgi and mod_pagespeed not working

I installed mod_pagespeed on my server and it's working as far as the page header is concerned: X-Mod-Pagespeed:1.7.30.5-3847 The problem is that it's doing nothing else. No whitespace or comment ...
-1
votes
1answer
651 views

Error code: ssl_error_rx_record_too_long on nginx ubuntu server

I have a site which was perfectly running with apache on some old ubuntu server and also has https for it. But now for some reasons i need to move to different(new ubuntu server with high ...
0
votes
0answers
208 views

Apache error log with django application showing “strange” error

My django code was previously in /var/www and all worked just fine. Yesterday, I decided to move the code in /root and keep the static files in /var/www for security purposes. I am using Django 1.6.5 ...
0
votes
0answers
33 views

Djapian in Ubuntu trusty

I'm trying to migrate my Django server to a new server running Ubuntu trusty (the last one ran lucid). I've got almost everything working except for Djapian: when I run python manage.py index ...
0
votes
0answers
103 views

Server configuration in production for Django applications

I want to deploy my Django project to production as follows: example.com # redirect to www www.example.com # for dynamic files static.example.com # for static files media.example.com ...
0
votes
0answers
106 views

Apache single sign on redirecting to success login page, Django application

All I have a Django web application with relative paths url. For instance, I have www.example.com/inventory/get_item/?item_id=5 In the apache configuration I am using oracle single sign on to ...
0
votes
1answer
196 views

Howto rewrite URLs with two nginx as reverse proxies to gunicorn/Django

I have a Django application, deployed with gunicorn on port 8000, on a VM with a backend nginx, port 80, on the same VM. The nginx config is: location / { proxy_http_version 1.1; ...
0
votes
0answers
40 views

Installing PySide on an Amazon EC2 Instance Running Django

So I realize my title is almost laughable, but my situation is this. I have a fairly complicated desktop app written in Python and the PySide Qt bindings and I need to make a stripped down version of ...
0
votes
0answers
101 views

CenOS 6.5 Apache 2.2 Django Project gives / 403

I have Apache 2.2 running over CentOS 6.5 for first time. I faced no problem with Ubuntu with configurations below, but on CentOS always giving me 403 error. The example.com domain is living under ...
0
votes
1answer
79 views

Configuring Apache with Django

I'm trying to configure Apache with Django. Everything is working except the admin panel. It's static files are not loading. The documentation talks about different ways of doing it but none are ...
0
votes
1answer
123 views

Django, Ubuntu, Apache, mod_wsgi

I'm trying to configure apache with django on Ubuntu 12.04. I'm using mod_wsgi. I used a couple of different tutorials but none of them fully worked for me. Frustrated, I installed nginx without ...
0
votes
2answers
249 views

munin-cron Unable to Copy Contents

I recently installed munin on my (Fedora12 based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file /etc/munin/munin.conf by ...
0
votes
0answers
85 views

restart nginx after modifying settings.py and urls.py

In my django project, I modified the files settings.py and urls.py. My web application runs on nginx server. I reloaded the server using the following command: /etc/init.d/nginx reload But the ...
0
votes
0answers
45 views

Adding extra header using middleware module in django

I was trying to log the user-name in the nginx logs. As I am not doing basic http authentication, adding $remote_user in log_format doesn't work. I will need my application to tell Nginx what the ...
4
votes
1answer
64 views

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.
1
vote
1answer
105 views

How to Access Apache Virtual Host from Cell Phone?

I'm developing a mobile web application using Django. Currently I can start the Django development server like this: python ./manage.py runserver <my-ip>:8000 When I do that, I'll get a ...
0
votes
2answers
281 views

Django fails to find static files served by nginx

I know this is a really noobish question but I can't find any solution despite finding the problem trivial. I have a django application deployed with gunicorn. The static files are served by the ...
0
votes
0answers
84 views

Can't run django with lighttpd and FCGI

I'm trying to run django on lighttpd but I'm not able to do it. In logs I see this: 2014-05-30 13:45:32: (log.c.166) server started 2014-05-30 13:45:32: (mod_fastcgi.c.1103) the fastcgi-backend ...
2
votes
0answers
236 views

How to deploy django with uWsgi and nginx on CentOS

My version of Django is 1.6.3 I downloaded uwsgi-2.0.4. Someone says installing uwsgi with command make while someone use python setup.py build. What exactly is the difference? I saw a tutorial that ...