djangosnippets.org: Latest snippets tagged with 'changelist'http://djangosnippets.org/tags/changelist/2016-08-27T19:05:16.815045-05:00AvaliabilityAtDateListFilter
2016-08-27T19:05:16.815045-05:00m_aciekhttp://djangosnippets.org/snippets/10583/<p>If your model have two dates, start and end of something, you may want to have filter which allow you to show objects which last on specific day.</p>
Freely redistributableAction that respects the filters in changeview_list
2012-10-11T01:52:32.427674-05:00grillermohttp://djangosnippets.org/snippets/2832/<p>With this function if you filter using regular admin filters you'll reduce the queryset to the objects in view.</p>
Freely redistributableSave Admin ChangeList Filter
2012-01-11T10:55:23.450697-06:00msaronhttp://djangosnippets.org/snippets/2643/<p>Please provide suggestions on refining this code.</p>
<p>Thanks.</p>
Freely redistributableAccordion changelist admin
2010-12-16T08:46:43.932636-06:00djmhttp://djangosnippets.org/snippets/2293/<p>This is adapted from <a href="http://djangosnippets.org/snippets/1818/">rodnsi's version</a> to work with Django 1.2 (as django.contrib.admin came with jQuery built in as of 1.2).</p>
Freely redistributableAdmin: ordering by multiple fields in a column sort
2010-07-16T02:19:03.678871-05:00benatkinhttp://djangosnippets.org/snippets/2110/<p>The new changelist supports clicking on a column header to order by that column, like iTunes. Unlike iTunes, which sorts by track number if you click the Artist or Album column header, it can only order by the column clicked on. By adding a property to my ModelAdmin, and subclassing …</p>
Freely redistributableAccordion changelist admin
2009-11-25T13:29:38.448284-06:00rodnsihttp://djangosnippets.org/snippets/1818/<p>Allows you to hide the filters in the pages of lists of admin.
Very useful when filters hide one or more columns.
Add this code after the block "extrastyle"
</p>
Freely redistributableIncrease maximum number of changelist items for "Show all" link to appear
2009-11-18T14:55:06.435255-06:00ramenhttp://djangosnippets.org/snippets/1809/<p>By default, a "Show all" link will appear in the changelist pager only if fewer than 200 records are in the result. Since it is rare that there will be more than one page of records yet fewer than 200, the "Show all" link almost never shows up. Pasting this …</p>
Freely redistributable