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)

2382.patch (3.5 KB ) - added by arnaud AT pimentech DOT net 18 years ago.
Propagates filter values (in GET) when editing or adding an object in admin

Download all attachments as: .zip

Change History (13)

by arnaud AT pimentech DOT net, 18 years ago

Attachment: 2382.patch added

Propagates filter values (in GET) when editing or adding an object in admin

comment:1 by arnaud AT pimentech DOT net, 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 Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by Jacob, 17 years ago

Triage Stage: Design decision neededSomeday/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 jakub_vysoky, 17 years ago

Keywords: nfa-changelist added

comment:5 by mrts, 16 years ago

milestone: post-1.0

Probably not in scope for 1.0.

comment:6 by Karen Tracey, 16 years ago

#9467 is another request for this ability.

comment:7 by jacmkno, 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).

in reply to:  7 comment:8 by jacmkno, 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:

  1. The comming request does not apply any filters
  2. 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 Joshua Cender, 16 years ago

Cc: Joshua Cender added

comment:10 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:11 by alTus, 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 Ramiro Morales, 16 years ago

Resolution: duplicate
Status: newclosed

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.

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