Use this tag for PostgreSQL issues which are to be solved in accordance with Django coding best practices.
Questions tagged [django-postgresql]
207 questions
0
votes
1 answer
postgres + GeoDajango - data doesn't seem to save
I have a small python script that pushes data to my django postgres db.
It imports the relevant model from a django project and uses the .save function to save the data to the db without issue.
Yesterday the system was running fine. I started and…

michael
- 2,577
- 5
- 39
- 62
0
votes
0 answers
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 PG )?
I googled for almost 1 week but wasn't able…

BosnianFlajter2
- 21
- 1
- 5
0
votes
0 answers
Increase number of Postgres pool connections for each Uvicorn Worker of a Django Application
I am running an asynchronous Django server with django-postgrespool2 as its Database Engine on my local machine. No matter how I configure the pooling parameters, it creates only a certain amount of pool connections. This number seems to be directly…

Subhadeep Dash
- 1
- 1
0
votes
1 answer
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': {
'ENGINE':…

veeresh G.S
- 15
- 7
0
votes
1 answer
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.utils.OperationalError: connection to server at…

Augustine
- 1
- 1
0
votes
2 answers
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 Django admin panel. As I am not running the project…

Barun Bhattacharjee
- 242
- 3
- 9
0
votes
1 answer
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 NAME or OPTIONS['service'] value.'. I really don't…

Haniyeh Khaksar
- 774
- 4
- 20
0
votes
0 answers
HOW TO FILTER DJANGO QUERYSETS WITH MULTIPLE AGGREGATIONS
Lets say I have a django model table
class Table(models.Model):
name = models.CharField()
date_created = models.DatetimeField()
total_sales = models.DecimalField()
some data for…

Futs TV
- 1
- 1
0
votes
1 answer
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, SearchQuery, SearchRank
from .models import…

Alvaro Bataller
- 487
- 8
- 29
0
votes
1 answer
Streaming Excel File with Django StreamingHttpResponse
I have usecase where I have to generate and send the excel file having records upto 4M ,since the file can be large I want to stream the response while I am generating the…

Sagar Gupta
- 21
- 2
0
votes
1 answer
ProgrammingError at column "" does not exist
I added a custom extension to djangos User model and now I'm getting this error on my localhost url:
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column users_account.birthday does not exist
LINE 1: ...…

Yehuda
- 27
- 15
0
votes
1 answer
__str__ returned non-string (type NoneType) error when trying to save in Django admin menu
I have create a custom user model for my project. I am using python-social-auth to log the user in. Logging in and getting the user data to database works fine but when I go to admin panel to change something manually I get this error. Even if I am…

IonicEcommerce
- 69
- 8
0
votes
1 answer
Django.db.utils.ProgramingError Relation doesn't exist
I am using Django3 and Postgres as Database, I clone the old project using Django and postgres, I cloned and setup the virtual environment for my project.
At the time of runserver, its throws me the error of
Django.db.utils.ProgramingError realtion…

Mahad_Akbar
- 3
- 2
0
votes
1 answer
Queryset for a sql query
See Filtering unique values for the problem description, sample data and postgres query. I'd like to convert the SQL to a queryset. I feel like I'm close but not quite.
SELECT Column_A, Column_B, Column_C, 0 as RN
FROM TABLE
WHERE COLUMN_C is null…

polestar
- 25
- 3
0
votes
1 answer
How can I query a Postgres DateRange with a single date?
I am using django.contrib.postgres.field.DateRangeField as described [here][1].
class MyModel(models.Model):
date_range = DateRangeField()
How to I query this model to return all date_range with a lower bound greater than today?
I tried:
today…

alias51
- 8,178
- 22
- 94
- 166