Skip to main content
1 vote
1 answer
65 views

Django ORM querying nested many to many table efficiently?

SO lets say I am designing a db for cooking session models as below from django.db import models class Recipe(models.Model): name = models.CharField(max_length=255) def __str__(self): ...
Dante's user avatar
  • 435
0 votes
0 answers
73 views

How to use DateField in an ArrayField in django

I'm trying to use ArrayField in my model. I get it working with, e.g., IntegerField, but not DateField. So I'm wondering, is there some limitation I'm not aware of, or is there a bit missing in my ...
Martin K's user avatar
1 vote
2 answers
1k views

How to connect Django project to containerized PostgreSQL database?

I'm trying to connect my local django project to a Postgres DB container. I am not sure why I get this error "django.db.utils.OperationalError: connection failed: :1), port 5432 failed: FATAL: ...
epsilon's user avatar
  • 15
1 vote
1 answer
169 views

Django Migration Error with PostGIS: 'double free or corruption (out) Aborted (core dumped)

I am developing a web application using Django and encountering a critical issue during database migration with PostGIS. While migrations work seamlessly with the SpatiaLite engine, switching to the ...
nic's user avatar
  • 11
0 votes
0 answers
52 views

Django 3.2 REST API : Postgressql video upload fails

I'm attempting to upload a video of 32 MB in 2k resolution to my backend django 3.2 rest api with postgres-sql as my database engine deployed on GCP ubuntu with v2 cpus and 8 Gb memory. My front end ...
Earthling's user avatar
  • 489
1 vote
2 answers
86 views

Using field in Trunc's kind property

I use PostgreSQL in my project and have three related models: class Timer(models.Model): start = models.DateTimeField() end = models.DateTimeField() task = models.ForeignKey( Task, ...
Korniichuk's user avatar
0 votes
0 answers
733 views

I need a simple python Django login example using database credentials

Could you please help me find an example of a simple login page where the users can be authenticated using user/password from a database postgres or mysql(I can change that afterwards from mysql to ...
BosnianFlajter2's user avatar
1 vote
0 answers
570 views

PostgreSQL table partitioning using Djano

Using PostgreSQL database and django-postgres-extra for creating a table partitioning in Django 4.2 application. The database settings are { "default": { "ENGINE": &...
Anuj TBE's user avatar
  • 9,922
1 vote
1 answer
61 views

Django Queryset: group by two field values

I have a model like this Class ExchangeMarket(models.Model): base_currency = models.ForeignKey(Currency) quote_currency = models.ForeignKey(Currency) ... various other fields And some entries like ...
ElRey777's user avatar
  • 321
0 votes
1 answer
418 views

I'm not able to connect proxy host database in Django

after running python manage.py runserver Got the Error port 5432 failed: FATAL: Feature not supported: RDS Proxy currently doesn’t support command-line options. DATABASES = { 'default': { ...
veeresh G.S's user avatar
-1 votes
2 answers
135 views

How to apply annotation to each item of QuerySet with Django ORM

There are a lot questions similar to this one but none of them worked for me. Let's assume that I have the following models: class Cafe(models.Model): name = models.CharField(max_length=150) ...
Jasur's user avatar
  • 359
0 votes
1 answer
510 views

What do I do to fix my PostgreSQL database connection problem in Django?

I am trying to connect my Django project to a PostgreSQL database I created on AWS but I keep getting this error message each time I run py manage.py runserver. Here is the error message: django.db....
Augustine's user avatar
0 votes
2 answers
370 views

Create Django admin panel where project is created using another language

I have created a project using Golang. I have used PostgreSQL as the database. Now I want to make an admin panel for this project using Django. I want directly reflect the database tables in the ...
Barun Bhattacharjee's user avatar
1 vote
1 answer
620 views

Django in connection with Postgres says settings.DATABASES is improperly configured

I am so new to Django and postgresql. Django made a connection at first step and created my tables, but after that just keep telling 'settings.DATABASES is improperly configured, Please supply the ...
Haniyeh Khaksar's user avatar
0 votes
1 answer
422 views

Django SearchQuery and SearchRank not finding results when 1 word matches in a 2 word query

I have a list of articles and I want to do a search using the PostgreSQL SearchQuery and SearchRank functionality. Here is the pseudo code: from django.contrib.postgres.search import SearchVector, ...
Alvaro Bataller's user avatar

15 30 50 per page
1
2 3 4 5
14