2
That is what happens when you define things at class level. Any code there is evaluated once at first import time, when the class itself is defined.
You explicitly evaluate your queryset, by calling sorted
on it, so it is no longer lazy.
You are aware of the get_queryset
method; this is exactly what it is for.
Source:stackexchange.com