What is the difference between a Class Based View CreateView and the mixing CreateModelMixin
- 阅读更多 关于 What is the difference between a Class Based View CreateView and the mixing CreateModelMixin
问题 I am have recently started learning DjangoRestFramework and I came across two ways to create model instances, one is through Django Rest Framework CreateAPIView and the other is CreateModelMixin. So I wanted to know what is the difference between them and also between the other mixins and Views which perform identical functions. 回答1: Here's the difference: mixins are (as described in the code comments) the basic building blocks for generic class based views - they're basically view-agnostic