CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 23:09:01 GMT
content-type: text/html; charset=utf-8
cf-ray: 964f5293ba33c1a1-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=184f1507-4a27-4c28-bebf-3a19fd2c2b8c; expires=Sat, 25 Jul 2026 23:09:01 GMT; domain=.stackoverflow.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
feature-policy: microphone 'none'; speaker 'none'
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 45130c68-4bf2-4a67-b9c2-a6ec6c53ecb3
x-worker-origin-response-time: 514000000
x-dns-prefetch-control: off
set-cookie: __cflb=02DiuFA7zZL3enAQJD3AX8ZzvyzLcaG7wSimpaszg2aUC; SameSite=Lax; path=/; expires=Sat, 26-Jul-25 22:09:01 GMT; HttpOnly
set-cookie: prov=184f1507-4a27-4c28-bebf-3a19fd2c2b8c; Path=/; HttpOnly; Domain=stackoverflow.com
set-cookie: __cf_bm=Hhqe.4DyF.2SoNnrzTj_q5KcmyouYPDmOA3K4A0EgfA-1753484941-1.0.1.1-NSb9n7opy63whbWEvXoypSHy_HThIjFCtr_Uqlk5n62EQavzqvr4VUAI3I2KydY7vL6GB0dakEtepbgkBXhPhhrXaFI2TvFoqUzJb_JroWs; path=/; expires=Fri, 25-Jul-25 23:39:01 GMT; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=.Js_lLb_rhl4E8YFdFc1MNRUON9i0d8jHU1SO7xbmoc-1753484941940-0.0.1.1-604800000; path=/; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'django-rest-framework' Questions - Stack Overflow
Skip to main content
Stack Overflow
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Advertising Reach devs & technologists worldwide about your product, service or employer brand
- Knowledge Solutions Data licensing offering for businesses to build and improve AI tools and models
- Labs The future of collective knowledge sharing
- About the company Visit the blog
Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
31,760 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
25
views
Django REST Framework `pagination_class` on ViewSet is ignored
Describe the Problem
I have a ModelViewSet in Django REST Framework designed to return a list of Order objects. To improve performance, I'm trying to implement custom pagination that limits the ...
0
votes
2
answers
39
views
how DRF undestand which field in serialazer.py is related to which model field?
imagine i have a super simple serializer.py file :
and i just want to use it ! nothing special ..
so im going to write something like this (with a model class called "Product") & its ...
2
votes
1
answer
35
views
source is not working for deserializing POST data in django rest framework
The following example doesn't work as expected, and returns a validation error. Why is that?
from rest_framework import serializers
class TestSerializer(serializers.Serializer):
from_field = ...
1
vote
1
answer
32
views
need to combine an enum and a timesstamp in DRF
Django Admin: How to combine archived_at and archive_status into one archival source?
I’m building a feature to archive users via Django Admin. Currently, I’m using both a DateTimeField (archived_at) ...
1
vote
1
answer
29
views
DRF I need object/instance-level premissions granted but view/model-level permissions denied
I have a rather simple backend and API with two user types, User and Admin. I have created groups and permissions in Django. The Admin should CRUD everything and the User should only view and edit ...
1
vote
2
answers
105
views
How to use CustomUser with dj_rest_auth to sign up with email and password
How to use CustomUser with dj_rest_auth to register with email and password.
I have the source code below, but the username information is required during the sign-up process.
I would like to know how ...
1
vote
1
answer
43
views
Slug is not created correctly due to using django parler
I have a problem creating a slug based on the title and pk, due to the use of parler.
I'm using Parler for multilinguality in my API, and when I try to create a slug like
title-pk I'm getting various ...
1
vote
1
answer
53
views
How to support multiple Google Cloud Storage buckets in a Django FileField without breaking .url resolution?
I'm using Django with django-storages and GoogleCloudStorage backend.
My model has a FileField like this:
raw_file_gcp = models.FileField(storage=GoogleCloudStorage(bucket_name='videos-raw'))
At ...
0
votes
1
answer
40
views
How do I log filtered GET requests on a Django REST Framework ModelViewSet using @action?
I have a ModelViewSet for EventReportLink and need to log every time someone queries with ?event_report__id=<id>. I’ve tried adding a custom @action(detail=False, methods=['get']), but I’m not ...
0
votes
1
answer
30
views
How to make DRF use url path as empty and base path?
I am trying to omit the URL path for an action in a ViewSet like
@action(detail=False, methods=['patch'], url_path='')
def update_current_user(self, request):
But when I give url_path as an empty ...
1
vote
1
answer
51
views
Elasticsearch search only by one field
I have app on drf and i added elasticsearch(django_elasticsearch_dsl) for searching. But i faced with problem, when i want to search on two or more fields, elastic searching only by one field.
I'm ...
1
vote
1
answer
79
views
React doesn’t receive API tokens after Google OAuth redirect via social_django/drf-social-oauth2
I'm implementing Google OAuth2 for my Django REST API with a React frontend. The basic flow is set up correctly.
I have routes for:
urlpatterns = [
path("admin/", admin.site.urls),
...
0
votes
1
answer
43
views
CSRF token not set
I was creating my api using django restframework. I am using simple jwt for authentication. The tokens are generated after user login via his/her email and password but before login email must be ...
3
votes
3
answers
34
views
DRF Delete API Method Get Error instead of delete
I'm trying to delete a Classroom object from the database. When I try to go to Django Rest Web Browser to fetch api/classroom/delete/1/ I get this response.
HTTP 405 Method Not Allowed
Allow: DELETE, ...
0
votes
1
answer
49
views
How should I define redirect request properly
I have a social network project for users to share their recipes. The Recipe objects managed by a ViewSet, which has Serializer, where create and update recipes operations defined, via POST and PATCH ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
-
-
-
Related Tags
django × 27623
python × 12925
django-models × 4291
django-views × 2899
python-3.x × 2019
django-serializer × 1667
rest × 1448
serialization × 1380
reactjs × 1140
json × 711
javascript × 547
django-forms × 475
authentication × 474
django-rest-auth × 450
jwt × 428
django-templates × 410
django-filter × 406
postgresql × 388
django-queryset × 374
django-rest-viewsets × 337
axios × 312
angularjs × 277
vue.js × 263
angular × 259
more related tags
Hot Network Questions
- Blinded despite Blindsight?
- When was the last time all alive humans stayed on earth?
- Word order for a phrase with a number, adjective and noun
- Most practical way to determine concentration of reducing sugar in frozen French fries?
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Why aren't there baleen whales at about the size of a dolphin?
- What does this word "ahn-shdah-heh" mean?
- In Jurassic Park, is the lysine dependency intentionally fake (in-universe)?
- leftmargin in enumerate
- Not your ordinary affix riddle
- When playing sine into class D amplifier, why is Vdd ripple voltage the 2nd harmonic of the sine?
- tac-command is it a bug or a misinterpretation of the manual?
- Does Philosophy Need Quotes?
- Why is 0.0 printed as 0.00001 when rounding upward?
- Moving multiplying cells away
- Symbols for A.P. Morse's book in Set Theory
- spots / stains on tubeless tire
- Are classified documents subject to a subpoena in discovery?
- Is there a way to retrieve my inventory from the void in Minecraft Java Edition?
- Heretofore I think I have been using 'heretofore' incorrectly
- Is a chemistry-first technological paradigm as plausible as one focused on physics or biology?
- When and why is fwait necessary when using the 8087 coprocessor?
- Break long equation: vertical alignment of indentation
- Anonymizing a submission for double-blind review