- Django 2 Web Development Cookbook
- Jake Kronika Aidas Bendoraitis
- 72字
- 2021-06-10 19:31:32
Getting ready
First, you will need to create reusable mixins. A good place to keep your model mixins is in a utils module, such as the one that we will create later in the chapter (along with some typical examples of mixins). If you create a reusable app that you will share with others, keep the model mixins in the reusable app, instead—possibly in a base.py file.