Package: django-itemlist
ItemList is a customizable Django Admin ChangeList-like app for use outside of the admin.
It can be used to create versatile paginated lists of objects which can be searched, filtered
and provide links to detail pages similarly to the admin ChangeLists.Provides a generic class-based viewItemListView.ItemListViewclass itemlist.views.ItemListViewA page representing a list of objects, with a search box, list filters, sortable columns, pagination and optional
links to detailed pages.Ancestors (MRO)This view inherits methods and attributes from the following Django  views:django.views.generic.list.ListViewdjango.views.generic.list.MultipleObjectTemplateResponseMixindjango.views.generic.base.TemplateResponseMixindjango.views.generic.list.BaseListViewdjango.views.generic.list.MultipleObjectMixindjango.views.generic.base.ViewMethods and attributeslist_columnsA list of field names to display in columns. Supports double underscore lookups.list_filtersA list of field names ordjango.contrib.admin.SimpleListFilterinstances for generating filters on the list.list_searchA list of field names to include in search operations. Supports double underscore lookups.list_transformsA dictionary mapping field names to functions for transforming column values before display. Transform
functions must take two argumentstransform(value, obj), whereobjis the object corresponding
to the list row.list_headersA dictionary mapping field names to header names for explicitly specifying the column header text.list_stylesA dictionary mapping field names to css style classes to add to the HTML of the columns.link_urlA named url for creating links to detailed pages. IfNone(default), no links are created.link_kwargThe link kwarg parameter forlink_url. Default is ‘pk’link_attrBy default links are created with the url in the href attribute of an anchor tag. The attribute can be
changed by setting the link_attr parameter of the view. For example settinglink_attrtodata-linkwill
create a tag that looks like<a href=”#!” data-link=”http://…”>…</a>.  This is useful for loading
content using JavaScript into modals or for ajax. This parameter replaceslink_databoolean in previous
versions.link_fieldColumn name on which to create links. Must be one of the names included in list_columns. By default the
first column will be used.get_list_columns()Return the field names to display in columns. By default, simply returns the value oflist_columns.get_list_filters()Return the list_filters to display. By default, simply returns the value oflist_filters.get_list_search()Return the list of field names to include in search operations. By default, simply returns the value
oflist_search.get_list_transforms()Return the dictionary of transforms to use for the columns. By default, simply returns the value oflist_transforms.get_list_headers()Return the dictionary of column headings. By default, simply returns the value oflist_headers.get_list_styles()Return the dictionary of column css styles. By default, simply returns the value oflist_styles.get_link_url(obj)Return the detail url link for the current object/row. By default, uses the named url fromlink_url, thekwargfromlink_kwargand the value of the attribute.get_link_kwarg()Return thekwargto use for the detaillink_url. By default, simply returns the value oflink_kwarg.get_link_field()Return the name of the column on which to create the detail links. By default, returns the first column.get_link_attr()Return theattrto use for the detaillink_url. By default, simply returns the value oflink_attr.Example views.py:fromdjango.utilsimporttimezonefromitemlistimportItemListViewfromlibrary.modelsimportTopicclassTopicList(ItemListView):template_name='myapp/topic_list.html'model=Topiclist_filters=['kind','parent']list_columns=['id','name','acronym','kind','parent__name']list_search=['name','kind__name']list_headers={'parent__name':'Mommy'}link_url='library:topic-detail'link_field='name'paginate_by=20defget_context_data(self,**kwargs):context=super().get_context_data(**kwargs)context['now']=timezone.now()returncontextExample urls.py:fromdjango.urlsimportpathfromlibrary.viewsimportTopicListapp_label='library'urlpatterns=[path('',TopicList.as_view(),name='topic-list'),]Examples for myapp/topic_list.html. The default template if none is specified is exactly the same as below:{%extends"base.html"%}{%blockcontent%}{%include"itemlist/embed_list.html"%}{%endblock%}Another template example, equivalent to above. This allows you to reorder/omit components.{%include"itemlist/filters.html"%}{%include"itemlist/list.html"%}{%include"itemlist/pagination.html"%}