Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [django-rest-framework]

Django REST framework is a powerful and flexible toolkit for building RESTful Web APIs. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.

django-rest-framework
0 votes
1 answer
22 views

how to show user in TokenSerializer dj-rest-auth

I'm trying to return UserSerializer after successful login through dj-rest-auth. I followed the steps that were told in After login the `rest-auth`, how to return more information? which has a similar ...
Damir Talipov's user avatar
0 votes
0 answers
27 views

Validation in DR(Django)

I'm trying create customs validations to my serialiazer but Django just ignore them and return me DRF default errors. {'message': 'Erro ao criar camião', 'data': {'plate': [ErrorDetail(string='This ...
Tiago Lourenço's user avatar
0 votes
0 answers
20 views

Hosting strategies for python django rest api very light weight applications in production environment?

I am currently hosting python web services on apache server with mod_wsgi in daemon mode. Every thing is fine until, I have added a new virtualhost or changed existing virtualhost becuase when I have ...
RajKumar's user avatar
0 votes
0 answers
9 views

"OutstandingToken.user" must be a "User" instance

I am getting this error while logging in, This is due to adding 'rest_framework_simplejwt.token_blacklist' to my settings.py, but without it everything works fine. this is the traceback ValueError at /...
Lakshay's user avatar
0 votes
1 answer
34 views

Django decorator and middleware issue

My decorator looks like this def require_feature(feature_name): def decorator(view_func): print(f"process_view - view_func: {view_func}") # Debugging @wraps(view_func) ...
Jean's user avatar
  • 147
0 votes
1 answer
12 views

How do you hide "BlacklistedToken" and "OutstandingToken" from django admin panel?

After I added the JWT functionality to my REST apis built using djangorestframework, I have noticed these two models (BlacklistedToken and OutstandingToken) on my django admin panel that in the django ...
Ashkan Ranjbar's user avatar
0 votes
0 answers
29 views

Django REST framework serializer.is_valid() saves files to MEDIA_ROOT although .is_valid() is False

I have a project which supports file uploads via Django forms and also Django REST framework, these files are used are stored in a model 'Document'. The issue is that when a file that fails validation ...
H0lyBruh's user avatar
-3 votes
0 answers
13 views

Autentication JWT, backend in Django Rest Framework and Frontend in Next.js [closed]

I have a backend built with Django Rest Framework, where I've implemented authentication using simpleJWT, and everything is working when I test with Postman. My question pertains to the frontend I'm ...
GUSTAVO CARVALHO's user avatar
0 votes
2 answers
25 views

Large GET Request to DRF causes 504 Gateawy Time-out

I have a database with about 3 million records, and I want to retrieve these records to be displayed by a Django web app. However, attempting to pass these via Model.objects.all() passed by templating ...
Casey's user avatar
  • 520
0 votes
0 answers
17 views

Error Getting TOken : ('invalid_grant: Invalid JWT Signature.', {'error': 'invalid_grant', 'error_description': 'Invalid JWT Signature.'})

I don't understand why I am getting this error every time while generating a bearer token for Firebase Messaging V1s Api . def Generate Token(): try: SCOPES = ['https://www....
ZeeSHAN Ali's user avatar
0 votes
0 answers
31 views

Django OTP Verification Through Email

Registration always goes in successful but then after submitting otp for verification, first error response "error":"authentication failed" and when I try again "error": ...
quarjo's user avatar
  • 1
0 votes
1 answer
31 views

Using Django REST Framework to make site cross-platform [closed]

I want to create cross platform site in Django, which can work with other clients, like my own c++ apps. Imagine someone creating social media in which you can post videos and articles. What I want is ...
user26482297's user avatar
0 votes
0 answers
23 views

Filterset_class does not working when view is called from test

I have a drf method view: @action(detail=False, methods=["get"], filterset_class=None) def count(self, request, *args, **kwargs): ... and of course, there is a ...
Pedit Ma's user avatar
0 votes
0 answers
17 views

Getting a 403 Forbidden accessing Swagger UI in Django REST Framework behind Basic Auth

I am deploying a Django Rest Framework application. The application runs under gunicorn (port 8000) which is proxied by Apache. (I need to use Apache due to some authentication requirements in certain ...
rlandster's user avatar
  • 7,614
0 votes
1 answer
16 views

django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'api.User' that has not been installed

I just create Django project and get this error django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'api.User' that has not been installed this my files settings ...
mehdi ahmadi's user avatar

15 30 50 per page
1
2 3 4 5
2129