Hi,
I've decided to teach myself Django and I'm enjoying the tutorial which I've so far found exceptionally detailed but I'm a bit confused by the get_queryset function in the IndexView class.
Essentially my question is what calls this function?
Is it automatically called when the class is used? I appreciate this is part of a generic view and it's a built-in function, so that makes some sense to me, but it's not clear.
I've looked elsewhere in the documentation, at the generic views in particular and whilst get_queryset is used in another example, I see that it isn't a mandatory requirement, as other examples have just a model or queryset assignment, the latter of which shows a filtered assignment.
So is the get_queryset just a way of automatically creating a queryset attribute?
I'm not seeing any advantage to this at present to a more simple, queryset =
I guess I need to finish the tutorial but if someone could help me understand how this fit together, I would be most grateful.
Regards,
Tony