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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

Development Server Failing to see CSS Files | Django

Right, being a Python & Django student using VSC so therefore, in the interest of not having a nervous breakdown here, how on earth do other VSC users import CSS files into their HTML/PHP ...
Hunktydunkaty's user avatar
-3 votes
0 answers
35 views

Visual Studio Code Needing Glasses when it returns NameError [closed]

I am currently training in Python using the Django framework with Visual Studio Code. I am currently mapping out the URLPATTERNS from the root directory. I've come over from PyCharm but for some ...
Hunktydunkaty's user avatar
1 vote
1 answer
51 views

Having difficulty connecting to PostgreSQL with Django hosted on IIS

Trying to host Django 4 app with PostgreSQL database on Windows Server 2016 with IIS manager 10 and httpPlatformHandler 1.2. The app and database work without issues when running on a VM server with ...
Nika Tvildiani's user avatar
0 votes
1 answer
106 views

Error 404 Message | Django | PyCharm

Right, is there any particular valid reason as to why - despite me doing everything correctly - do I get the error 404 message when I deploy my development server (on port 8000) from PyCharm? This is ...
Hunktydunkaty's user avatar
0 votes
0 answers
20 views

ValidationError on formset after user stopped POST request with browser goback

I have a django admin form containing a multiple files field and some inlines formsets after. When user's connexion is slow, it happens they close the page or go back to the previous page (no patience ...
yo_e-h's user avatar
  • 3
0 votes
1 answer
56 views

Running php and django on two subdomains

My friends and I have made a project which is made out of two parts. One is made in Django and other one is made in php language. We have just one server so we want to use 2 subdomains. My question is ...
Mehan Alavi's user avatar
0 votes
0 answers
37 views

Django: Configuration for serving static files on IIS server

I have a django application deployed on an AWS IIS server. Static fils are served just fine via 'runserver', but not via the IIS server. I have done everything right but it doesn't work. i even tried ...
Henry's user avatar
  • 1
0 votes
0 answers
44 views

How can I enable mod_wsgi in Apache2.4.57.0 on Windows?

Apache/2.4.57 (Win64) Django 2.4.2 I am new to Django and I tried to connect it with Apache through mod_wsgi but it seems new versions of Apache does not support such kind of module. I installed ...
Miroslav Ivanov's user avatar
0 votes
2 answers
50 views

Apache virtualhosts conf let wrong servername requests going through proxy

I have moved a server configuration to a new server and at the same time configured it with apache mod_proxy to access a gunicorn/django webserver (inside a docker container on port 8000). Previous ...
yo_e-h's user avatar
  • 3
0 votes
0 answers
93 views

Do I need to use an Nginx reverse proxy between AWS Application Load Balancer and Gunicorn running in Fargate?

I have a Django backend application running with Gunicorn inside a Docker container in Fargate. Since I'm not serving any static files from the Django server (they are being served via Cloudfront) do ...
Alvaro Bataller's user avatar
0 votes
1 answer
136 views

Access errors passing traffic from nginx to daphne server

I've got a GKE private k8s cluster with nginx and a django application running with wsgi and asgi. Logs from nginx show that websocket requests get a 403, and the logs on the daphne pod are showing &...
markwalker_'s user avatar
0 votes
1 answer
47 views

mailman3 - css files of hyperkitty placed in wrong directory

I have installed mailman3 and followed this instruction: https://lab.uberspace.de/guide_mailman-3/ My problem is, that css files for HyperKitty (and the login screen) are not available. If I'm on ...
habakuk's user avatar
  • 61
0 votes
1 answer
148 views

Nginx doesn't see or use subdomain config

Problem: nginx doesn't apply configuration for subdomain if there are domain and subdomain config at the same time. Disclaimer: I'm new to nginx and server deployment. Question: What I do wrong with ...
agas0077's user avatar
1 vote
1 answer
239 views

Django CSRF verification failed after setting SSL with Certbot

I'm currently working on a Django project that utilizes Docker, and I recently set up an SSL certificate using a containerized version of Certbot in order to secure my Django app through HTTPS. ...
Nikko's user avatar
  • 111
0 votes
0 answers
76 views

403 FORBIDDEN APACHE django

Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.1.12 mod_wsgi/4.9.4 Python/3.11 Server at localhost Port 80 I am trying to run my django project on my windows machine.. in apache this the configuration i ...
Abhiram T N's user avatar
0 votes
0 answers
390 views

100 concurrent requests to a Django-App with Gunicorn lead to "54: Connection reset by peer" and 502's

I'm hosting a Django-App which serves as an API-Endpoint. Unfortunately the App which uses the API does a lot of concurrent requests on page-load (in the realm of 80-90 requests). Nginx is running as ...
Subito's user avatar
  • 388
0 votes
0 answers
178 views

unable to find django error when running django app through apache2

I am trying to get a django app running on a apache2 server both on a raspberry pi for a project of mine. The appache server is running but I can't pull up the web page as I just get an "Internal ...
907VigiL's user avatar
0 votes
0 answers
280 views

cors policy blocking request from my docker django nginx app

I am trying to make a POST request from my React app deployed locally to my dockerized Djano app deployed in Google Compute Engine. I am receiving this error: Access to XMLHttpRequest at 'http://X.X....
Nikko's user avatar
  • 111
0 votes
0 answers
148 views

EC2 with a Caddy + Gunicorn setup sporadically unreachable

I have an EC2 instance that runs a Django via gunicorn, in which Caddy sits on top of. The domain is hosted in Route53 with an A record pointing to the IP address of the instance. Here's what I ...
Alcher's user avatar
  • 1
0 votes
1 answer
151 views

Connect Redis Unix Domain Socket to Django

I have a Django website running via nginx under user www-data and gunicorn under user myuser bound at /run/gunicorn.sock. nginx works just fine; it acts as a proxy to the gunicorn Unix domain socket. ...
Bobort's user avatar
  • 126
0 votes
1 answer
709 views

Gunicorn quits without notice

I'm deploying a django/nginx/gunicorn site and am following this guide while doing so. Following the subheading "Final Steps for Production Deployments", I've created a production gunicorn ...
Matthew Calabresi's user avatar
2 votes
1 answer
113 views

get request problems while running nginx + gunicorn + django-plotly-dash

The web site is running, Gigicorn has multipule workers. For some reason the url_calling : http://web?id=value the id=value do not propagate coherently, (sometimes it works, but most of the time it ...
user3505444's user avatar
0 votes
1 answer
1k views

Connecting to hosts postgresql from django app running in a docker container

I am trying to connect to my hosts postgresql server (version 14) from my django app running in a docker container. here are my settings docker-compose.yml: version: '3' services: web: build: ...
bwright's user avatar
  • 123
0 votes
0 answers
381 views

nginx not serving static files after adding app to docker-compose

I have an app (blog) made with Python and Django. Using docker-compose I've managed to deploy it to a Digital Ocean droplet. The Docker stack includes a Postgres db nginx, nginx-proxy and the nginx-...
guillermo_dangelo's user avatar
0 votes
1 answer
685 views

Best way to config gunicorn and nginx with django?

I am trying to deploy django with gunicorn and nginx on heroku, and i'm kinda confused with the way to config gunicorn and nginx, when i searched through internet, they usually create gunicorn.socket [...
Tùng Nguyễn's user avatar
0 votes
0 answers
33 views

How to generate embedded element for other site to consume?

If I put a link on a comment on Twitter, facebook and other place the website analyse the link and show a small preview of the link if possible. It could be a small player for a video or an image with ...
alfor's user avatar
  • 1
3 votes
2 answers
3k views

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 ...
CutePoison's user avatar
0 votes
1 answer
2k views

connection refused django gunicorn nginx

I am getting following error when running search feature on my site (search feature makes api request to my api server): 2022/08/31 21:01:56 [error] 726#726: *23 connect() failed (111: Connection ...
codyc4321's user avatar
  • 103
1 vote
0 answers
358 views

Page not found (404) error. "The current path, dashboard/auth/login/, didn’t match any of these."

I'm attempting to get Devstack and Horizon working on Ubuntu 20.04. Devstack seems to install OK. I'm following the steps: All-In-One Single Machine, DevStack Networking, (Horizon) Quickstart, and ...
BurningKrome's user avatar
6 votes
3 answers
5k views

Using Nginx to Block Connections that aren't addressed to my domain

I am running a django app on AWS elastic beanstalk and I'm getting spammed by bots trying to scan for vulnerabilities. It results in a flood of errors such as: (Where xx.xxx.xx.xx is my ec2 instance's ...
Del's user avatar
  • 163
0 votes
0 answers
257 views

Apache Reverse Proxy using mod_proxy

0 Introduction I'm trying to setup a server with a main website hosted on ports 80 and 443 (let's call it example.com) and a section on this website that serves umami analytics hosted on port 3000 (...
Tox46's user avatar
  • 13
0 votes
1 answer
1k views

Configure two application in same server in Nginx on two ports

I have two different applications. Survey application built with express framework Django application using rest api and react I would like to achieve: vardhan.com/survey, vardhan.com/feedback, etc ...
vishnu vardhan's user avatar
1 vote
2 answers
705 views

AWS application can't connect to external API without public IP address

I have a Django application that's running on AWS EC2. That application occasionally makes requests to an external API (stripe.com). I tested it extensively and it passed all my tests. When I deployed ...
Fabio Araujo's user avatar
0 votes
1 answer
839 views

Linux / Django / Site not reachable

Something wrong. 2 months ago I was able to access my django server to this url/port http://212.47.245.79:8000/ Yesterday I went back to this machine, as connection was down. I have restarted django, ...
fransua's user avatar
  • 111
1 vote
1 answer
598 views

Nginx redirects to ```https://server_name/ ```URL instead of ```https://server_name/projectname/``` , after changing the URL from http to https

I have a couple of URLs like https://server_name/projectname/, now the problem is if I type this URL on the browser, Django (or Nginx) redirects me to https://server_name/, which does not exist. ...
Davood's user avatar
  • 113
2 votes
1 answer
3k views

NGINX not Serving Image Files Properly

I have set up a django website that would be served by Nginx, everything was working perfectly not until images stopped showing recently. I tried inspecting the possible cause of this strange ...
Ruby's user avatar
  • 71
0 votes
1 answer
231 views

How would I dynamically add servers to a load balancer?

This is a tough question to phrase in the limited space for the title, but I'll try my best to explain myself. I want the users of my website to be able to run the servers themselves. Those servers ...
Nick M's user avatar
  • 1
1 vote
1 answer
76 views

Nginx behind Apache

I have an apache who is hosting websites one is 000-default.conf for www.domain1.com another one is domain2.conf for www.domain2.com and has a config like this <VirtualHost *:80> ...
peachy__kat's user avatar
0 votes
1 answer
688 views

How to serve phpMyAdmin to localhost/phpMyAdmin instead of localhost:8080 using nginx in docker

In my project, I am using Django and nginx, but I want to manage my cloud databases through phpmyadmin. Django is working fine but I can't do the same with phpmyadmin because it is running in apache ...
Ram Awasthi's user avatar
0 votes
2 answers
507 views

How to invoke a .env file into a Django project that runs in a Docker container on a K8s server?

I most likely only need a hint into the right direction. I have a docker container running a Django app using gunicorn and nginx. This Django app is currently getting its environment variables from a ....
David's user avatar
  • 159
1 vote
1 answer
5k views

Invalid HTTP_HOST header. NGINX config not preventing localhost invalid headers from IP port scanners hitting django

I am getting an Invalid Host header error from my server and I am unsure how to address it. The errors request URL is https://127.0.0.1:8000 and the obvious suggestion is to add localhost to my (using ...
Atayls's user avatar
  • 11
-1 votes
1 answer
388 views

How to Intercept and cache LDAP Search and Bind requests

I have a production web server running Django. Currently every request made requires an LDAP Bind and Search request. I can use the django-auth-ldap plugin to enable LDAP Search caching. However, my ...
Anthony Fammartino's user avatar
0 votes
0 answers
2k views

Error 502: Deploy Django application with Gunicorn and Nginx

I have developed a web application with Django and I am trying to publish it in a virtual machine created with Azure. To do that I'm using the following software stack: Ubuntu (20.04) Django (3.0.7) ...
El_Merendero's user avatar
1 vote
1 answer
45 views

Reduce amount of network traffic by filtering attackers in AWS

just installed a simple django web application in an AWS EC2 instance. The instance is always on, but currently not used by anyone (it is still in development). Recently AWS is accounting lots of ...
Wishper's user avatar
  • 113
0 votes
2 answers
488 views

Hosting two different django project in the same droplet with different subdomains (NGINX, Gunicorn, ubuntu)

As the title says I want to host two different django project in the same droplet (NGINX, Gunicorn, ubuntu) with different subdomains. One will be our main site example.com. which is up and running ...
Ixion Chowdhury's user avatar
1 vote
1 answer
564 views

Why does Apache with mod_wsgi force a download of .py files instad of executing them?

Why does Apache with mod_wsgi force a download of .py files instead of executing them? I'm trying to run Django, but the first issue I have is .py files not executing. I'm following the docs here ...
BlueDogRanch's user avatar
-2 votes
1 answer
773 views

Hosting Multiple Django Websites on a VPS

I'm moving away from WordPress and into bespoke Django websites. I've settled on Django as my Python framework, my only problems at the moment are concerning hosting. My current shared hosting ...
StudioProjects's user avatar
1 vote
1 answer
785 views

Supervisor not reloading Gunicorn properly with Django project

I am using Supervisor to reload Gunicorn when pushing Django project to production : Workflow : " && python manage.py migrate"\ " && python manage.py ...
Gaetan GR's user avatar
1 vote
1 answer
759 views

Apache: restrict serving images to authenticated users

I'm trying to figure out a way to restrict access to a media folder in my apache config. The folder takes uploads from from a Django site and image/pdf uploads are displayed in the site to ...
Bob's user avatar
  • 15
1 vote
0 answers
380 views

How to disable upstream buffering Nginx + Docker + Gunicorn?

I'm trying to use Nginx as proxy server between client and Gunicorn. Nginx, Gunicorn (Django) are Docker's containers. Problem is I can't disable buffering of upstream when I send large file from ...
Vokson's user avatar
  • 11

1
2 3 4 5
21