311,484 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
63
views
"django.db.utils.NutSupportedError: extension 'postgis' not available" error being thrown despite having postgis installed in Python virtualenv
I am attempting to migrate model changes I have made to my codebase to a PostgreSQL server (PostgreSQL 18.1 on x86_64-linux, compiled by gcc-11.4.0, 64-bit), but every time I do this error is thrown. ...
Best practices
0
votes
3
replies
51
views
I have 3 different account types in a Django project. Should I use 1 or 3 apps?
I'm new to Django. I've been making a project with 3 types of accounts: Schools, professors and users. But I feel like some things would be too "repetitive" like some model fields and views ...
-7
votes
0
answers
18
views
i cant install taiwind css in my django project [duplicate]
(venv) PS C:\poultry_link\poultrylink> npx tailwind css init
npm error could not determine executable to run
npm error A complete log of this run can be found in: C:\Users\naallah\AppData\Local\npm-...
-4
votes
1
answer
63
views
django model with foreign key onto settings.AUTH_USER_MODEL fails when app is incorporated into other app using postgres [duplicate]
I have a survey app that works fine as a standalone app with no complaints (using sqlite).
But when I incorporate the survey app into another that is using postgres as a database, it fails to run the ...
1
vote
1
answer
56
views
django model with foreign key onto settings.AUTH_USER_MODEL fails when app is incorporated into other app using postgres
I have a survey app that works fine as a standalone app with no complaints (using sqlite).
But when I incorporate the survey app into another that is using postgres as a database, it fails to run the ...
0
votes
0
answers
41
views
Using django-storages S3 implementation for Minio with s3v4 signature
I have "successfully" set up django-storages to work with our self hosted Minio instance.
This is the settings for the setup:
STORAGES = {
"default": {
"BACKEND&...
1
vote
2
answers
60
views
Does a ModelSerializer catch "django.core.exceptions.ValidationError"s and turn them to an HTTP response with a 400 status code?
Let's say this is my model:
from django.core.exceptions import ValidationError
class MyModel(models.Model):
value = models.CharField(max_length=255)
def clean(self):
if self.value == &...
4
votes
0
answers
91
views
Django ManyToMany table missing even though migrations are applied (Docker + Postgres)
Problem
I am working on a Django project using a PostgreSQL container in Docker. I added a ManyToManyField to one of my models. I keep migrations in .gitignore because my local and production ...
0
votes
1
answer
27
views
Does Django inlineformset allow for editing & submitting related model data?
I'm attempting to display a form for a tennis event (location, time/date) and each of its participants (name, status). I was recommended to use an inlineformset, which I assume would allow editing of ...
1
vote
0
answers
81
views
Django ManyToMany self relationship with through model — user_from and user_to reversed behavior
I added following and followers by using intermediate model, it's ok but does not correctly specify objects in the intermediate model. I expect the user who follows must to be in the user_from field ...
0
votes
0
answers
76
views
Django DRF JWT Authentication credentials were not provided on UpdateAPIView even for is_staff user
I'm implementing JWT authentication using Django REST Framework and djangorestframework-simplejwt in my project.
I have an endpoint for updating a category.
What I tried
Verified that the JWT token ...
-1
votes
1
answer
62
views
What does _db used for in a django Model Manager
While trying to create a custom QuerySet and a custom Manager for a django Model I stumbled upon the documentation sections 1 and 2 that use the manager's _db property and i would like to understand ...
0
votes
1
answer
54
views
Gunicorn (Uvicorn Worker) continues processing requests after Heroku 30s timeout
I’m running a Django (ASGI) app Heroku using Gunicorn with the Uvicorn worker to support WebSockets.
Heroku has a hard 30-second request timeout. When a request exceeds 30 seconds, Heroku closes the ...
1
vote
2
answers
57
views
Does using Django model choices for search filters add server load on every page request?
I’m building a Django-based classifieds website.
Previously, my search form populated districts and categories using database queries like:
districts = (
AdPost.objects
.filter(admin_verified=...
0
votes
0
answers
55
views
Change color for StackedInline?
I'd like to change background color for these headers for different color (not white):
Like this:
My models:
from django.core.validators import MinValueValidator, MaxValueValidator
from django.db ...