Skip to content
Advertisement

What does format=None do in Django rest full API

Recently when I read Django rest full API document I faced this code :

JavaScript

this code is work fine but I look for format=None and I cant find out what does it do. is any body know what is it and why its important to be?

Advertisement

Answer

The django rest framework (drf) documentation explains it here.

The gist of it is that when you want to support multiple file types in your response, drf provides a shortcut to support this, but requires you to include ‘format’ as a keyword argument.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement