Override default dictionary for settings REST_FRAMEWORK #1212
-
Hi! We already have an API in place based on "plain" DRF. But now we want to introduce a v2 of the API, based on the JSON:API module. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
DJA is only a thin layer over Django REST framework and fully depends on it, so it is therefore not possible to have two different setting dicts. However, within Django REST framework you can overwrite the configuration in the view itself by setting the respective attribute. You could create your own JSON:API specific view and derive all classes from that view. |
Beta Was this translation helpful? Give feedback.
DJA is only a thin layer over Django REST framework and fully depends on it, so it is therefore not possible to have two different setting dicts.
However, within Django REST framework you can overwrite the configuration in the view itself by setting the respective attribute. You could create your own JSON:API specific view and derive all classes from that view.