Opened 17 years ago

Closed 17 years ago

#4413 closed (wontfix)

[Patch] Admin should remember last listing page

Reported by: jim-django@… Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: Keywords: pagination
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

My users are working through a largish set of objects one by one. They select an item, edit it, and click the save button, which takes them back to the list of objects they were at. When they've finished a few dozen, though, and are working through the second or third page, clicking the save button takes them back to the first page of the list of objects; they find this annoying and confusing.

Here's a simple patch that solves this. It keeps track of all list parameters, not just page number; so it will take users back to the right point in a filtered search, for example.

This is implemented by storing the most recent change list parameters in the session, and restoring them, if present, when objects are saved.

Attachments (1)

remember_change_list_params.diff (2.2 KB ) - added by jim-django@… 17 years ago.
patch to contrib/admin/views/main.py to return users to the last viewed change list after saving.

Download all attachments as: .zip

Change History (3)

by jim-django@…, 17 years ago

patch to contrib/admin/views/main.py to return users to the last viewed change list after saving.

comment:1 by Charmless <jim-django@…>, 17 years ago

Patch needs improvement: set

Er, it's ugly and has a bunch of debug code in there. Sorry. But you get the idea.

comment:2 by Malcolm Tredinnick, 17 years ago

Resolution: wontfix
Status: newclosed

We aren't patching current admin any longer, since it has very limited lifespan and will soon be replaced by newforms-admin.

You might want to try and work out a change for newforms-admin, although I suspect you won't need to patch core at all, but rather just change some things in the ModelAdmin class for your particular app in that case.

As a tip for the future: please submit patches from the base of the django source tree so that we can see the full path. Otherwise we have to hunt around to find the right file to patch.

Note: See TracTickets for help on using tickets.
Back to Top