November 2015
Beginner to intermediate
840 pages
26h 30m
English
This chapter is a whirlwind tour of managers, querysets, fixtures, and commands. The last two rely heavily on the first two, making managers and querysets the central focus of the chapter, despite the amount of time we spent creating a full management command.
A manager can be extended to add new methods but can also be modified for seamless interaction with custom querysets. The tools to do this are
QuerySetClass.as_manager()
ManagerClass.from_queryset (QuerySetClass)
overriding get_queryset() in ManagerClass to ...
Read now
Unlock full access