[patch] object_list should accept lists as well as QuerySets
|Reported by:||Grimboy||Owned by:||nobody|
|Cc:||frankie@…||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
object_list should accept lists as well as QuerySets. This is perhaps a matter of opinion. Obviously getting access to a list in urls.py isn't practical. However, lots of people use generic views as a way to "finish off" real views. It therefore seems a bit limiting to only accept QuerySets. A view may parse some items in an xml file and return them as a list or may do a raw SQL query rather than using Django's ORM. So this is not an impractical addition.
I haven't renamed the queryset argument since it is often specified by keyword. Another, perhaps cleaner solution would be to rename queryset to sequence and accept queryset as a deprecated (or not) argument.