Skip to content

Request for API documentation #9491

Discussion options

You must be logged in to vote

The value comes from here:

https://github.com/encode/django-rest-framework/blob/master/rest_framework%2Fnegotiation.py#L40-L45

So I think it's when you call your endpoint like this:

/v1/users/1.json  # suffix is json
/v1/users/1.xml   # suffix is xml
/v1/users/1?format=xls  # format query param is xls

And so on...

DRF can use this format override to filter suitable renderers, in the piece of code that you found.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #9436 on August 06, 2024 10:51.