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

0
votes
0answers
13 views

point domain at another URL + dynamically generated subdirectory?

I have built a Django-based application that is intended to serve different discrete website from different URL variants. What I would like to be able to do is point various domains at the content ...
-1
votes
1answer
35 views

trouble deploying django under apache on centos with mod_wsgi

EDIT 2: I got this running mostly! It was indeed a SELinux issue. So most things work, I get a cannot write to a read only database error. And some of my things that seem like static are not ...
0
votes
1answer
25 views

AWS RDS Postgres performance issue

We are using rds(postgres) with instance type as db.m4.2xlarge. Usually most of the time number of connections are 8-10. But on some occasion as the number of connections increases to 100-200. DB ...
0
votes
1answer
9 views

Django uwsgi deploy. Unable to find 'application'

Has a problem when starting uwsgi: unable to find "application" callable in file dashboard/wsgi.py unable to load app 0 (mountpoint='') (callable not found or import error) uwsgi.ini: [uwsgi] ...
0
votes
1answer
15 views

Django admin assets are not avaiable on elastic beanstalk

I created a basic Python Django environment on AWS. My project is generated with django-admin startproject michaelmalura. I added an app with django-admin startapp blog. After i publish my project ...
2
votes
1answer
34 views

Troubleshooting nginx caching for static assets

I have a Django website where users post images for the whole community to see (kind of like 9gag). I use Azure storage to save and serve the images. The webserver is an nginx reverse proxy + ...
-1
votes
0answers
14 views

Nginx 400 Bad Request - The plain HTTP request was sent to HTTPS port

I have the following Nginx conf, When I go to the site thru https, everything is fine. However, when I go to the site thru http, I'm getting the follow error: 400 Bad Request - The plain HTTP request ...
0
votes
1answer
63 views

Nginx rewrite certain port to subpath (nginx + uwsgi + django)

My goal is to rewrite everything under http://localhost:8000 to http://localhost/foo I followed every step mentioned in this link, but still couldn't get it work. Here's my settings: urls.py ...
0
votes
1answer
113 views

Wiring uWSGI to work with Django and nginx on Ubuntu 16.04

I am trying to follow this tutorial to setup uWSGI with Django and nginx on Ubuntu16.04. It all works fine up until the very last step (oh the irony...) where I try to execute this command: sudo ...
0
votes
0answers
9 views

502 3 12152 Error after upgrading Django version

After upgrading to Django 1.9 from 1.7, and upgrading a number of other python libraries related to Django and my web service, I get a 502.3 12152 error in IIS logs. Looking that up, the error ...
2
votes
1answer
24 views

Strange 404 URL requests on my site

I recently launched a Django powered site and I have 404 error reporting on. I've been getting some strange URL requests, one every couple of days. /renewPwd.php/ /index.php/ /mobile/ /m/ ...
0
votes
1answer
19 views

Pointing 3 domains to same Django app and using different urls to serve each

So I have three domains and three subdirectories in my django app. lets say my IP is x.x.x.x I want the app to work like this: url_visited_by_the_user content_served_from www.domain1.com/ ...
1
vote
1answer
32 views

django uwsgi and nginx = 400 bad request

I moved my Django website and pip3 install Django. I use the same uswgi wrapper than on the install of server #1 and it works. On server #2, I get a 400 Bad request. If I stop the uwsgi server, I get ...
1
vote
2answers
59 views

Django mobile template detection with nginx and varnish

I'm trying to get django-mobile (uses different template namespace depending on device type) when behind varnish and nginx. I thought I had it figured out, but with my current set up, it seems that ...
1
vote
0answers
31 views

start: Job failed to start UWSGI,

Trying to configure ubuntu+nginx+uwsgi+django upstart script /etc/init/uwsgi.conf description "uWSGI application server in Emperor mode" start on runlevel [2345] stop on runlevel [!2345] setuid ...
2
votes
3answers
72 views

Nginx: 502 Bad Gateway error with (111: Connection refused) to uWSGI socket while running django

I am building an app using an Nginx, uWSGI, Django and Postgresql stack. The app uses a Unix socket between Nginx and uWSGI. The file permissions on the socket is 775. But I still get this permission ...
2
votes
3answers
91 views

Nginx 1.2.1 custom 404

I'm trying to make a custom 404 error with nginx. First in my local machine I added the following lines to the default site: error_page 404 /custom_404.html; location = /custom_404.html { ...
0
votes
0answers
26 views

How can I configure a Django website to work with Apache 2.4 VirtualHosts?

I recently started developing Django websites and I want to deploy them on a CentOS VPS with mod_wsgi and Apache. I followed this guide and it works perfectly, but I would like to have more than one ...
0
votes
0answers
18 views

Django deployment: configuring correct python to be used by apache/mod_wsgi

I am new to working with Django based applications and trying to deploy a django project using following configurations, which are almost similar to the default given on django docs. apache2.conf # ...
1
vote
0answers
108 views

Django Site with httpd and mod_wsgi: 403 Forbidden

I've spent the whole day trying to find an answer to my issue, yet I failed and decided to post my problem here instead. So I have develop a Django Application and now I'm having problems in deploying ...
0
votes
0answers
41 views

Cant cache REST api by nginx

I use django through uwsgi for my API. I try this config upstream django_dev { ...
1
vote
0answers
37 views

Django Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'

I am getting errors from Django 1.7 application hosted in Digital ocean. Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'. The domain name provided is not valid according to RFC 1034/1035. Request ...
0
votes
0answers
27 views

Directory index forbidden by Options directive:

I am trying to host a django app on centos 6.4 and django 1..6.5.I read many thread related to this error and applied whatever thread suggested but still I am getting the same error. <VirtualHost ...
0
votes
0answers
28 views

Amazon EC2 public DNS not working, getting nginx needs to be configured screen

I have successfully deployed a Django project. The Both the IP address and the domain name work. The Amazon EC2 public DNS doesn't work. When I navigate to ...
-1
votes
1answer
39 views

Apache Error (AH01276), Cannot serve directory /var/www/project/:

I am trying to deploy a Django web app on a newly installed centos7 server. for this i am using apache2.4 with mod_wsgi. i am stuck at serving the static files and because i am new to this, this is ...
0
votes
1answer
32 views

Proxy using nginx

I'm in the midst of a significant rewrite/update of group of services and am struggling with geting Apache/Nginx/Django to play nice with each other. What's happening here is there is an internal ...
0
votes
0answers
47 views

Python/Django/WSGI/Apache webserver gateway timeout with outgoing SSL connections with urllib2/urllib3/requests

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. Outgoing connections with any of urllib2, urllib3, or requests, connections to non-SSL (on port 80) ...
1
vote
0answers
19 views

urllib3 failure through Apache/WSGI; successful from python commandline

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. When first setup, outgoing connections from this webserver using the Python library urllib3 were ...
1
vote
1answer
67 views

Nginx and Gunicorn 'err_conn_refused', but nginx not logging error

I've been playing around with Django Cookie Cutter for local projects, and wanted to put it on my DO Droplet as a semi-production staging environment. The server is set up with Nginx reverse ...
1
vote
1answer
79 views

Getting SSL to work on Django project

I'm trying to get my Django website to move entirely to https (currently it's solely http). The webserver is nginx (reverse proxy) and gunicorn. However, even after correctly installing SSL, opening ...
0
votes
0answers
27 views

application's stdout to NginX's error_log - same as mod_wsgi

I have Django project served via Apache (mod_wsgi) - recently switched to NginX + uWSGI. Currently I have it served via both at different ports to benchmark the overall performance gain. One issue I ...
1
vote
2answers
94 views

Docker cannot access Webserver on host

I'm trying to setup pythons django inside a dockerized environment Dockerfile FROM python:3.5-slim ENV PYTHONUNBUFFERED 1 RUN mkdir /code RUN pip install --upgrade pip WORKDIR /code ADD ...
0
votes
0answers
34 views

python server running but nothing in web browser

I have python server running in terminal but I don't get anything in my web browser, beside it, below is written django 1.8.3 but I made upgrade to django 1.9.2: (env)root@mx:/srv/mercury# python3 ...
0
votes
1answer
108 views

Nginx, angularJS, django and phantomJS configuration

I have succesfully set up Django, angularjs and phantomJS (for SEO purposes) to work together, however I am having a small problem with routes. http:// something.com/?_escaped_fragment_= gets ...
0
votes
1answer
30 views

What user should run the gunicorn process?

When running a Django application on a Debian server, should you create some sort of application user (e.g. "myappuser") and run the gunicorn process as that user or can/should gunicorn be run as ...
0
votes
1answer
41 views

What is right way to tmux with fabric django?

1.I am doing this on local machine tmux new -s amazon then I ssh in to the server into tmux window shh user@amazon then I detach it ctrl b-d Into fabfile.py I am doing like this local("tmux ...
0
votes
0answers
145 views

Multiple Gunicorn daemons for Django projects with Nginx result in 502 Bad Gateway for one

I want to run two Django applications on the same server, with Nginx and Gunicorn. I can run them separately, but not both at the same time: When I try, one is OK, but for the other one I receive 502. ...
0
votes
0answers
13 views

Apache cannot change location errorlog in virtual host

I use the directive ErrorLog ${APACHE_LOG_DIR}/error1.log in a virtual host. But the output error is still in error.log. I have restarted apache but things doesn't work. However, the relocation of ...
0
votes
2answers
56 views

Nginx configuration for long-running tasks

I have a web-based application that conducts some linguistic analysis of user-submitted texts. This is a rather memory-intensive task and typically takes an extended period of time (e.g., up to 3 ...
0
votes
1answer
466 views

Postgresql Error: could not receive data from client: Connection reset by peer

I try this stack: nginx + uwsgi + django + postgresql, the request can reach to views of django, client show 500 server internal fault, I check postgres log, found the error could not receive data ...
1
vote
0answers
23 views

Can I give a staff user delete access without change access?

I manage a django-1.6 application where I want to give a staff user access to delete instances of a specific model through the /django interface without giving that staff user access to change ...
1
vote
1answer
102 views

Unable to restore postgresql data dump for Django app hosted on Azure VM

I am trying to restore a postgres data dump for a Django app of mine. The data dump was extracted from Heroku, and pg_restore is being run on an Azure VM with Linux on it. There are around 40 tables ...
0
votes
1answer
89 views

'Invalid input syntax for type inet' db error in Django app with postgres when Gunicorn+Nginx(reverse proxy) installed

I have a Django app with postgres back-end where I'm configuring gunicorn to work behind nginx as reverse proxy. My machine runs Ubuntu 14.04. Everything seems to have worked, except I've run into a ...
0
votes
0answers
39 views

After deploying django app to Elastic Beanstalk, all environmental variables are lost

Each time I use eb deploy to deploy a new version of my Django app to Elastic Beanstalk, it acts as if it has successfully deployed and then all requests start failing. If I ssh into the actual ...
1
vote
1answer
347 views

setup ssl on nginx for a django project

I want to setup ssl for nginx, my project is a django and i also use gunicorn as wsgi http server. I add following lines in my settings.py code : CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = ...
0
votes
0answers
9 views

Number of Apache ModWSGI threads for Django App?

Is there any point of specifying the number of threads for a Django app running in Apache's ModWSGI, and if so, what would the optimal value be? This post explains how to best select the number of ...
-2
votes
1answer
366 views

Sending emails via django does not work on Gunicorn / NGinx`

I am trying to send an email from my django application. However, this does not work on my NGINX (used for static resources) + GUNICORN Server. But, the same works on django's default webserver. I ...
1
vote
1answer
44 views

NGINX: Prevent users from viewing website on port (example.com:5000)

I've setup an ubuntu VPS, which is running a django app. I'm using waitress as a WSGI server and whitenoise to serve static files. Also nginx serves the media folder. The current setup works great at ...
1
vote
0answers
117 views

Supervisor doesn't run gunicorn with django

I want to run supervisor in my Django server with gunicorn and Nginx, but when I run "supervisord" the supervisor log says: 2015-11-06 23:23:36,746 INFO daemonizing the supervisord process 2015-11-06 ...
1
vote
1answer
26 views

Running a script before packages are installed from requirements.txt

My app has some prerequisite conditions that mean that the installs from requirements won't work until a few scripts are run. I've been reading through the documentation on customizing the Python ...