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.
Questions tagged [django]
1012 questions
3
votes
1 answer
django_session table killing my MySQL server and django app
I need your help
I hav a Django app that is about 7 years old and have been degrading now..every time the website goes down and back up and the issue is with mysql server
Usually i need to just restart mysql server and it comes back up..i have been…

uberrebu
- 503
- 6
- 17
- 36
3
votes
1 answer
How to store database credentials in Google App Engine Standard?
I'm experimenting with hosting a Django application on Google App Engine Standard and to do that I followed the tutorial Running Django on App Engine Standard Environment. That tutorial completely ignores the problem of safely handling credentials…

Pablo Fernandez
- 7,438
- 25
- 71
- 83
3
votes
2 answers
uWSGI and NGINX 502: upstream prematurely closed connection
I have a Kubernetes cluster which is running Django application within docker container served by uWSGI. The ingress controller is ingress-nginx (this one: https://github.com/kubernetes/ingress-nginx).
Recently I did an upgrade of the whole…

Djent
- 99
- 2
- 6
- 16
3
votes
1 answer
Restart Django/uWSGI vassal in uWSGI emperor mode
I am running a django site using uWSGI in emperor mode. I have found that while touching the uwsgi.ini file for a specific application does indeed cause the emperor process to reload that vassal (according to the log file) that a reload is not…

digitaladdictions
- 1,505
- 1
- 12
- 30
3
votes
0 answers
How to fix mysql has gone away, high writeiops, switch to postgres?
We have a Django site (Django 1.4) running under NGINX and uwsgi. The site uses MYSQL 5.6.39 which runs on a separate AWS RDS instance. It runs fine for about a week but then suddenly we get the dreaded MYSQL 2006 error - MYSQL server has gone away.…

Marc
- 151
- 2
3
votes
1 answer
Nginx redirecting every url to localhost
I have a Django website running with Nginx and Gunicorn. Everytime I call a url on the server, example website/url, it redirects to localhost/url. I have given the nginx settings in both nginx.conf and sites-available/site-name
nginx.conf:
user…

Shounak
- 31
- 3
3
votes
1 answer
CSS not working on live Django site
This site is live and hosted with Digital Ocean. I finally got it to work properly, however the css won't work for the site? Here's what I have setup, there are no errors, just the css won't work.
I have this in my settings.py:
STATIC_URL =…

Garrett
- 149
- 5
3
votes
0 answers
NGINX Websocket initial communication delay
I've created a Django server that is making use of django-channels for websocket communication. When I run the server with NGINX there is an initial delay in websocket communication between the server and the client. After the initial delay all the…

MCBama
- 131
- 4
3
votes
2 answers
Supervisor doesn't start: couldn't chdir to ... EACCES
I'm setting up an ec2 server to run a django project with ngnix & gunicorn. The server is running Amazon Linux. When I run the start gunicorn command from the command line, it starts up the server, but when I try to run it from supervisor I get the…

hgolov
- 131
- 1
- 4
3
votes
1 answer
Hosting multiple Python or Django web apps - need advice on server strucutre/architechture
We have many web apps/sites. Some are fairly complex, but many of them are simple websites. Currently we host something like 10 sites in single dedicated server using nginx and uwsgi. While this is very cost effective and less time consuming to…

chhantyal
- 221
- 2
- 6
3
votes
3 answers
504 Gateway Time-out uwsgi + nginx django application
I'm trying to run my Django application using Nginx + uwsgi, but I receive 504 Gateway Time-out after one minute of loading.
My app takes time to do what needed as it searches for specific things on several websites.
My nginx conf is the next one: …

Cajuu'
- 131
- 1
- 1
- 3
3
votes
0 answers
uwsgi and "No module named django.core.wsgi"
On a fairly vanilla FreeBSD system without virtualenv, I'm having trouble getting uwsgi to work with Django.
Attempting to run generates this error:
Traceback (most recent call last):
File "./myapp/wsgi.py", line 3, in
from…
user148905
3
votes
0 answers
Configure Nginx to only allow specified hosts
I am running a Django Project on DigitalOcean (using Nginx, Gunicorn and Postgres), and I have specified the "allowed hosts" in the settings.py like this:
ALLOWED_HOSTS = ['sub.domain.tld']
Based on what DigitalOcean already set themselves, and…

Tobi
- 139
- 1
- 4
3
votes
1 answer
File upload issue with Django app running under Apache/mod_wsgi when daemonized
I've got a Django app running under Apache2 (linux) using mod_wsgi and file uploads fail when running in daemon mode but works when the python interpreter is embedded. Any idea what could be causing this and how I fix it?
The following Apache…

Tom
- 2,652
- 1
- 20
- 12
3
votes
3 answers
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:
listen 8080;
server_name …

newguy
- 195
- 3
- 10