Category "django"

Best way to pass random answers in Django Quiz App

I'm trying to build quiz app based on Cornell Notes, where the keywords will be the question with 4 answers (one correct answer and three random from other keys

How to change add another[object] behavior in TabularInline

I want to make an admin InlineTabular add another object button and take me to the object add page with prepopulated fields instead of creating an inline model

i am not get linkedin profile picture url in extra data using django allauth linkedin login

i can't get linkedin profile image in extra data when login using django-allauth. in extra data, profile picture url does't exist. i am using django==4.0.4, dja

django create a field that hold array of tupels or array of array

I want to add a field in my models that hold value like this field = [(1,2,3),(6,5,4),(5,6,7)] or field = [[1,2,3],[6,5,4],[5,6,7]] I am using po

Import issue in Djoser- Django

I'm trying to build an user authentication system with React and Django. I'm using JWT, Djoser for authentication model. serializers.py: from djoser.serializers

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

Using metamask to authenticate a SSO flow

Is it possible to do something like a social signup/login using crypto wallets like Metamask? Analogous to signup/login with Google/Facebook/Apple... Does the c

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

What Causes 400 Bad Request In Django Graphene and NextJs Using The useMutation Hook?

I am trying to build a simple todo app using Django, Graphene and NextJs. I was able to create todos in graphiQL and postman, however when I try to create a tod

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

django django-yearmonth-widget display month as month name

I have used package "django-yearmonth-widget" to have year and month selection and not complete date. Here, day is fixed i.e. 1st of every month. This implement

Django- Can only concatenate str (not "ManyRelatedManager") to str

I am trying to save my model. But when I try to save my model I throws the following error TypeError at /admin/user/teacher/add/ can only concatenate str (not "

how to display models.full_clean() ValidationError in django admin?

https://docs.djangoproject.com/en/4.0/ref/models/instances/#validating-objects from django.core.exceptions import ValidationError try: article.full_clean()

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 = [ # ...