id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 3777 Persistent change_list filtering in admin matt nobody "Attached is a patch which allows the list_filters on the change_list pages of the admin to be persistent (as described in e.g. [http://groups.google.com/group/django-users/browse_thread/thread/3931c387ea39b82f/2ba4f2f6ca064a61?lnk=gst&rnum=4&hl=en#2ba4f2f6ca064a61 this thread] on django-users). Basically, it does this: * Saves the elements of the query string in the session each time the change_list is viewed. * Looks for a special GET variable, and if found, restores the items last saved from the query string. * Add the special GET variable to links and redirects from the change_form, so that when saving an object, the user is redirected back to the filtered list s/he was last viewing. I'm not entirely sure this is the best way to solve this issue; something more transparent (i.e. without a magic GET variable) might be better, in which case the change_list filter links would have to explicitly unfilter themselves, rather than simply removing the query variable. The patch admittedly also adds a setdefault method to request.session; the rest of the patch could trivially be adapted to not having this method available, of course.. I've found it useful on many occasions, though, and it seems to fit the ""use session as dictionary"" idea. If folks find the patch useful, I can resubmit with documentation and/or without request.session.setdefault." New feature closed contrib.admin dev Normal duplicate filter session Mikhail Korobov Accepted 1 1 1 1 0 1