views.generic.list.MultipleObjectMixin.get_context_object_name()

get_context_object_name(object_list)

Return the context variable name that will be used to contain the list of data that this view is manipulating. If object_list is a queryset of Django objects and context_object_name is not set, the context name will be the model_name of the model that the queryset is composed from, with postfix '_list' appended. For example, the model Article would have a context object named article_list.

doc_Django
2016-10-09 18:41:12
Comments
Leave a Comment

Please login to continue.