Category "django"

Group base permission rest api in Django

i am using Django rest framework for my login api. Now i want to login only certain group user through api. I have created group and assigned user to the group.

Django PDF parser on POST request

I hope for your help. Because I have been struggling with this problem for a long time. A POST request comes from the frontend with one PDF file, after which I

Need to override save method for image field and save it as base64 string using django

models.py class Organisation(models.Model): org_id = models.CharField(max_length=50,default=uuid.uuid4, editable=False, unique=True, primary_key=True)

python module installation error when deploying a Django application on heroku

I am deploying my django application on heroku. but when installing the modules from the requirement.txt file, it returns an error on the "Paydunya" module. I a

The new url id is getting appended after the previous request's url

I'm making a get request in django using html form as: crud.html <form action="{% url 'crudId' id %}" method="get"> <div class="col">

How can I get 'sign in with Google' to work using 'dj_rest_auth'?

I'm trying to implement Google sign in using DRF and dj_rest_auth. I've set up 'django-allauth' with Google as provider and the sign in process works in the web

Django Graphql Auth not logged in user

I'm using Django Graphql Auth in my api but when I want to get the current logged in user always get the Anonymous. # settings.py MIDDLEWARE = [ # ...

Django web site URLS gets "?next=" randomly after deployed to heroku

After deploying django app on heroku the url after every form submission or link in site been press resulting with "?next=" inserts into the URL address, I don'

How to solve (unix:/home/richard/www/firstsite.sock failed (13: Permission denied) while connecting to upstream)?

I am trying do do this tutorial in a CentOS 7: https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-centos-

pythonanywhere django static files are not collected from application

The problem is that static files from Django app are not being collected in pythonanywhere. After the command python manage.py collectstatic In the directory /

Django rest framework: Unit testing post request gets status code 400

I'm doing some unit tests in this restaurant app, and the API request to cancel orders returns code 400 when running "manage.py test" command, but doing the sam

how to have multiple user types in django

this app is a school management system with django i have three types of user in my web app, my problem is how to authorize these and give them permissions. use

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,