merge ApiView and GenericAPIView #9783
-
I struggle to see the purpose difference between the two. The naming itself conveys the lack of distinction between the two (ask a stranger what is the difference in role between the APIView and the GenericAPIView, according to their name). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the main distinction is that I think having them separate gives the option to the user to opt to the more bare option when they need to. |
Beta Was this translation helpful? Give feedback.
I think the main distinction is that
GenericAPIView
assumes to work with a model / queryset while the baseAPIView
is not. I've usedAPIView
to implement more custom stuff which don't map directly to a model: a proxy endpoint calling an 3rd party service with a secret key behind user auth.I think having them separate gives the option to the user to opt to the more bare option when they need to.