Category "django"

Can't migrate after makemigrations on django

everyone. I newbie in this field. So, After I finished makemigrations. then I migrate this error code occurs. I try to solve it but still stuck. please guide, I

Can I change model admin verbose name based on user group login in django?

I am aware of the Model Meta tag to specify the verbose_name, verbose_name_plural. But require the verbose name in model admin based on user login based on the

Selectively hit the update signal for a model

I have a model called as nodes: class node(models.Model): name = models.CharField(max_length=200) status = models.CharField( max_length=32,

TypeError: 'module' object is not iterable in django 4

TypeError: 'module' object is not iterable in django 4 I am getting the above error, it has persisted long enough than at this point I really need help. I am u

How to load data from multi-level nesting object

``` when i do the School.objects.filter() query , how to load student object in single query using School.objects.filter() ``` class School(models.Mode

Populate data in pdf using django

I have to show a certificate in modal with the 2 option print and email. Certificate is pdf file i just need to fill two fields in the certificate user name and

decreasing values with loop in Django

in this code, I tried to decrease the quantity of products from the database when the user places the order, it is working but the problem is just decreasing fr

Django Queryset with multiple joins and filtering

I need a list of jobs joined with houses joined with owners Results row should contain: job_id, job_worker_role1, job_worker_role2, job_worker_role3, house_id,

How to use insomnia with django?

running django locally and with firefox, i login with http://localhost:8000/admin/ and after that i can access http://localhost:8000/myCustomApi successfully. o

Show message in Django without needing a request

I have a view which uses threading e.g from .utils import my_heavy_function def my_view(request): if request.method == "POST": form = my_model_form(

messages not appearing in admin on AWS dev server Django-3.1

context: Django 3.1 app deployed to a AWS lambda with terraform. I have not set up my production settings yet, this is my dev server. I'm using https://github.c

Docker Container not loading static files from Django-React Project

I've been trying to get my main.js file and css static files to load in my container and on google cloud for the past 4 days. Here is my file tree: main/ - fr

Error! Unable to find binary python3.8 for runtime python3.8 on Vercel

When i was deploying django app on vercel i got this error Error! Unable to find binary python3.8 for runtime python3.8 Error! Check your logs at https://kompu

Django does't send email on the remote server

I am trying to send an email when a user fills out a form on my site. Everything works on my local server, letters are sent. On a remote timeweb.com server with

Getting Django migration error "sequence must have same owner as table it is linked to", but all tables and sequences have the same owner

I'm trying to run a migration in a Django project. (Django 3.1, Python 3.9.9) I'm in my virtual environment. I keep getting a puzzling error. python manage.py

How to manage JSON data in javascript pass form django model?

I need to dynamically display my audio on my website. The audio is a file path stored in the Django model. Djanog Model: class audio(models.Model): instrumentId

OpenID Connect + Django DRF + React: How to use?

I have a web application made up of two parts: back-end which is implemented using Django + Django Rest Framework (DRF), and front-end which is a React App proj

In django admin panel permissions given to the users by group not working

In Django admin panel I create groups and give permission to them. eg: Create a Student Group and give it permission to view the student model. Create a Teacher

How to filter in django by greater than or less than dates?

I'm a little confused with the documentation on Django Rest Framework. I have read it several times but I cannot makes sense of it. Maybe I'm not smart enough,

Django bulk update list of objects

I want to create an API endpoint, where you can PUT list of objects and it will work like this: If the ID is specified, query that object and try to update it (