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
3
votes
2 answers

Server Clustering (Django, Apache, Nginx, Postgres)

I have a project deployed with django, Apache, Nginx and Postgres. The project has requirement of live data viewable to customers. The projects main points are: 1. Devices in field send data to server(devices are also like website users) after…
user38827
  • 145
  • 2
  • 5
3
votes
3 answers

What's the optimal way to set up a Django server to serve multiple sites?

I currently use Apache 2.0 and FastCGI to serve my Django sites (I host multiple sites from a single server / IP). Each site has it's own FastCGI process which stops Apache forking multiple copies which can use a lot of memory and means I can…
Jon Cage
  • 329
  • 1
  • 3
  • 12
3
votes
1 answer

Django, wsgi, py. what's the difference?

I'm trying to get a django application up and running on my cpanel system. I've installed mod_wsgi, and am following the guide here: http://www.nerdydork.com/setting-up-django-on-a-whm-cpanel-vps-liquidweb.html However, I'm now confused as I don't…
Kenny
3
votes
2 answers

Redis cannot bind a specific ip address?

I'm new to redis, but I want to set one up on my Raspberry Pi 4 (RP) for using it in a Django application (with celery). On my RP I have installed a firewall, ufw, and allowed incomming traffic from my PC's IP on port 6379 (redis port). I have then…
CutePoison
  • 131
  • 1
  • 3
3
votes
1 answer

Do I have to restart my server after changing settings.py?

I have a django app hosted on digitalocean with gunicorn and nginx. I have just changed something in settings.py. I have taken my SECRET_KEY and now I stored it in etc/secret_key.txt settings.py with open('/etc/secret_key.txt') as f: SECRET_KEY…
Sven
  • 135
  • 1
  • 6
2
votes
0 answers

Nginx - UWSGI 504 gateway timeout

I saw lots of topics of nginx 504 error , but non if them solved this. Im using nginx , uwsgi on 1 machine to run Django application . i tried to add these config line at the end of /etc/nginx/nginx.conf : uwsgi_read_timeout…
2
votes
0 answers

AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`

Traceback (most recent call last): File "/home/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/home/lib/python3.6/site-packages/django/core/handlers/base.py", line 115,…
naveen chary
  • 21
  • 1
  • 4
2
votes
1 answer

Configure gitlab-ci.yml to run pytest in docker container on Gitlab CI

I have a Cookiecutter django project which uses Docker. I write my tests using pytest and I run my tests using docker-compose -f local.yml run django pytest. My local.yml file is in my root dir (where manage.py is) I want to run these tests…
2
votes
1 answer

nginx, gunicorn, Django 499 error 60s

I get a 499 error after 60s whatever the config I try. I use Docker on a 8 core/32GB server and there is another nginx/lets-encrypt reverse proxy in front for the others containers. I am more on the dev side of the craft. I suppose I need to run my…
Patrick Aymar
  • 21
  • 1
  • 2
2
votes
1 answer

nginx, docker, and gunicorn url without the port number in the url

I have a django app that's also using gunicorn and nginx. I'm able to access my site using http://url:8000, but I don't know how to correctly configure it so I don't have to use the port number in the url at all, ie http://url would by the same as…
pnus
  • 33
  • 2
  • 7
2
votes
1 answer

Forbidden after enabling SSL

I recently used LetsEncrypt's Certbot to enable SSL on my server. It's running Apache 2.4.18 with Django 1.11 on Ubuntu 16.04. As explained here, I duplicated my :80 VirtualHost definition for 443 in the same file. I am now getting 403 Forbidden…
BThompson
  • 191
  • 1
  • 1
  • 7
2
votes
1 answer

Serve Django Media Files via Nginx (Django/React/Nginx/Docker-Compose)

Context I have a single page web app using the following stack: React for the frontend Django for the backend Nginx for the webserver The web application is dockerized using docker-compose. My React app, fetches data from the Django server…
Teddy
  • 121
  • 1
  • 4
2
votes
2 answers

FATAL: password authentication failed for user that I just created, with a correct password.I

I installed postgres with Django following this guide Here I created a database and a user in the postgres command line : CREATE DATABASE myProject; CREATE USER myUser WITH PASSWORD '1234'; When I try to connect to this database, either through…
2
votes
1 answer

How to transition from a local Django development server to a restricted public test server?

I am working on a website that should not be open for public viewing. I'm currently developing on my local computer using manage.py and runserver. However, I want to make the site publicly accessible to only a few certain people. These people are…
Lucas
  • 123
  • 4
2
votes
3 answers

Installing Shapely on Alpine docker

I am trying to move my project to docker and I've been using the alpine variant. This is a django project with postgres database Here is how i install the dependencies: ... ADD ./requirements.txt /srv/sites/mysite/requirements.txt RUN echo…
Amir Heshmati
  • 133
  • 1
  • 6