Category "django-rest-framework"

'cryptography' package is required for sha256_password or caching_sha2_password auth methods

Request Method: POST Request URL: http://192.168.0.110/admin/login/?next=/admin/ Django Version: 4.0.1 Exception Type: RuntimeError Exception Value: 'cryptog

drf - trailing / in url throwing error while calling post api

views.py class FurnitureViewSet(mixins.ListModelMixin, mixins.RetrieveModelMixin, GenericViewSet): permission_classes = [AllowAny] serializer_class = Fu

Django rest framework using Template to send an e-mail

I want to send a styled email using HTML tags. The mail is sent successfully but without style and the HTML tags are presented as a text in the email. handles.p

drf - remove miliseconds from serializers.DateTimeField when sending response

I have to write a serializer that returns datetime in the following formats: 2012-01-01T13:00:00+00:00 (utc_with_timezone) 2020-01-01T09:00:00 (must be in local

HTTP PATCH to check if handler is available

Can I use HTTP PATCH on endpoint /users to check if some handler is available?

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.

DRF Serializer Fields are not showing in Openapi Schemas

I set up openapi with the drf-yasg package for my DRF API but for some reason, all endpoints for POST or PUT in my documentation are not showing the necessary f

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)

xml attributes instead child elements

Using djangorestframework-xml, can someone please help me how to render child elements as attributes? Following the example below <CreateCustomerAndMortgage&

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 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

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 (

AttributeError: type object has no attribute 'get_extra_actions'

I have a small web app, and I'm trying to develop an API for it. I'm having an issue with a model I have called Platform inside of an app I have called UserPlat

Disable pagination inspector on drf_yasg

I'm using drf_yasg to create my swagger document but I have an issue with PaginationInspector. In one of my views I declare a paginator and in swagger, is shown

Is there a Django library that automatically display local currency based on a visitors country IP address

I'm trying to integrate a functionality on an Ecommerce website in Django, Where visitors are automatically shown local currency base on their country IP addres