Opened 18 years ago
Closed 16 years ago
#2382 closed enhancement (duplicate)
[patch] Save Filtering List Views in Admin into Session
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | minor | Keywords: | nfa-changelist |
Cc: | Joshua Cender | Triage Stage: | Someday/Maybe |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Another minor, but useful addition - when someone filters a list of objects in the admin, then edits one, then goes back to that list of objects, it would be nice if this filtering would be saved in the session so that it can span across pages. Many times people still want to see the same filtering on the object list page.
Attachments (1)
Change History (13)
by , 18 years ago
Attachment: | 2382.patch added |
---|
comment:1 by , 18 years ago
Summary: | Save Filtering List Views in Admin into Session → [patch] Save Filtering List Views in Admin into Session |
---|
I just added a patch to propagate filters as GET values when editing or adding an object in admin.
I don't think a hybrid version using both session and GET values is really practical. Maybe we should change the filter system to be session-only, but I'm not sure this is such a good idea. This would allow us to store filters on a per-model basis, though.
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 17 years ago
Triage Stage: | Design decision needed → Someday/Maybe |
---|
At some point, we'll be reworking the admin interface, and this will be one of the things we examine at that time.
comment:4 by , 17 years ago
Keywords: | nfa-changelist added |
---|
follow-up: 8 comment:7 by , 16 years ago
Some thoughts:
Session based filters is not an option. The option of sharing the URL to a filtered listing is a great functionality that cannot be lost.
In addition to preserving the filters after editing or adding, the fields in the add form should be pre-filled according to the filters applied.
(But that could be a separate ticket).
comment:8 by , 16 years ago
Maybe the filters can be saved into the session but they have to come back into the URL after editing or adding. This sounds as a good solution.
In the session the admin could have a dictionary with applied filters for each model. When the users go to the model record listing page, the admin detects 2 things:
- The comming request does not apply any filters
- There are some filters applied to the requested model in the session
In that case the admin can make a redirection to the same listing but putting all the session filters inside the URL as they normally are.
There should also be an extra control paramenter like: no_session_filters=1, and if that parameter comes in the request the admin does not make the redirection.
This sounds like a clean solution to me.
comment:9 by , 16 years ago
Cc: | added |
---|
comment:11 by , 16 years ago
Patch needs improvement: | set |
---|
This patch isn't up-to-date.
Could someone provide a new one or at least give some recomendations how to get such functionality?
comment:12 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Wait, this is a duplicate of #6903 that has an up-to-date patch. The current implementation there stored uses URL query strings to persist the filter status instead of sessions but the discussion in the ticket and in the associated mailing thread proposes also using session.
Propagates filter values (in GET) when editing or adding an object in admin