Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [django]

Django is an open-source server-side web application framework written in Python. It is designed to reduce the effort required to create complex data-driven websites and web applications, focusing on less code, no redundancy and being more explicit than implicit.

105,974 questions with no upvoted or accepted answers
15 votes
0 answers
772 views

Django channels with Spring Boot Websockets (StompSession) do not work

Hey there we want to use Django just to execute python code and use channels for the results. Implemented everything the websockets are not working as they should. If I try to send something from our ...
CptDayDreamer's user avatar
14 votes
1 answer
2k views

Graphene-Django and many to many relationship lookup

I have two Django models - Teacher and Student and have a many-to-many relationship. Teachers can have multiple students and students can have multiple teachers. There is 'through' model called '...
dotslash227's user avatar
14 votes
1 answer
3k views

Correctly Scraping and Displaying Japanese Characters using Python Django BeautifulSoup and Curl

I'm trying to scrape a page in japanese using python, curl, and BeautifulSoup. I then save the text to a MySQL database that's using utf-8 encoding, and display the resulting data using Django. Here ...
Ryan Rogers's user avatar
14 votes
1 answer
3k views

How can I use `django-rest-knox` with `django-rest-auth`?

I'd like to use django-rest-auth to easily make use of the registration and social auth features of django-allauth in my API. I'd also like to use django-rest-knox, as it provides a token per device, ...
StringsOnFire's user avatar
13 votes
1 answer
14k views

Supervisor FATAl Exited too quickly (process log may have details(About inet_http_server and unix_http_server)

I wrote a Django project and I use supervisor with gunicorn /etc/supervisor/conf.d/weather.conf [group:weather_station] programs=site [program:site] directory=$PROJECT command=/home/nhcc/.local/...
Jonathan Cheng's user avatar
13 votes
1 answer
4k views

How to profile Django on Gunicorn in production

I have a memory leak that is hard to reproduce in testing environment. So I'd like to profile my production server for a limited time period to get an overview about which objects take up most memory. ...
Wolkenarchitekt's user avatar
12 votes
1 answer
6k views

django.db.utils.InterfaceError: connection already closed

Stack: Ubuntu (20.04 LTS) Nginx Postgresql (v13.3) An AWS load balancer sends traffic to the Ubuntu instance(k8s cluster), which is handled by Nginx, which forwards on to Django (4.0.3) running in ...
Michele Matera's user avatar
12 votes
0 answers
3k views

How to configure Celery to run as systemd service with a Django application served by Gunicorn?

I followed the official Celery documentation regarding how to configure Celery to work with Django (python 3) and RabbitMQ. I already have a systemd service to start my Django Application using ...
donmelchior's user avatar
  • 1,025
12 votes
0 answers
3k views

Gunicorn spiking CPU to 100% on certain pages...killing performance

I have a Django app that is being served through Nginx / Gunicorn. When loading certain pages, Gunicorn is spiking in CPU usage to 100% and totally killing performance, causing the page to take 10 ...
demluckycharms's user avatar
12 votes
1 answer
823 views

Django Channels deny websocket connection with a custom code

So I need to deny a websocket connection with a specific code so the client can handle the rejection properly. Currently when you reject a connection with: message.reply_channel({'accept': False}) ...
MCBama's user avatar
  • 1,470
12 votes
1 answer
2k views

'TopLevelDocumentMetaclass' object is not iterable

I am very new to django world and I try to do some example to use it with mongodb. To connect to mongo I am using mongoengine 0.9.0. I am also using virtualenv. At the moment I have pretty basic ...
Raúl's user avatar
  • 121
12 votes
2 answers
2k views

Django 1.4: How to ignore fields, models in loaddata

We have a compressed dumpdata of 15MB upload extracting goes to 100MB. It has few models & fields that are not used in current tables. Specifically, there are few contenttypes models which can be ...
Iamcool's user avatar
  • 1,425
12 votes
3 answers
4k views

Django: Annotate based on an annotation

Let's say I'm using Django to manage a database about athletes: class Player(models.Model): name = models.CharField() weight = models.DecimalField() team = models.ForeignKey('Team') ...
8one6's user avatar
  • 13.5k
12 votes
1 answer
2k views

Django + Psycopg2: InterfaceError: only protocol 3 supported

When loading pages in my Django + Postgresql setup I occasionally get this error but not all the time: psycopg2 in connect InterfaceError: only protocol 3 supported psycopg2/__init__.py ? in connect ...
samgreeneggsham's user avatar
11 votes
1 answer
2k views

Can't push local Postgre database to Heroku

i have a problem getting my local database into Heroku.I'm currently working on building a Django web application and I tried to learn about getting local database to Heroku .I was trying to push my ...
ChangNoi997's user avatar

15 30 50 per page
1
2 3 4 5
7065