Django

Code

Ticket #5833 (assigned)

Opened 2 years ago

Last modified 4 days ago

Custom FilterSpecs

Reported by: Honza_Kral Assigned to: jkocherhans (accepted)
Milestone: 1.2 Component: django.contrib.admin
Version: SVN Keywords: nfa-someday list_filter filterspec nfa-changelist ep2008
Cc: eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl, alexkoshelev, marinho, danfairs Triage Stage: Accepted
Has patch: 1 Needs documentation: 1
Needs tests: 1 Patch needs improvement: 0

Description (Last modified by korpios)

One should be able to create custom FilterSpecs for the admin's list_filter interface.

Honza_Kral: I modified the filterspec definition to allow for users to register their own filters in admin. The mechanism is simple - I just reverted the order of the registry so that newly registered specs will come first. That way if you register your own filter via FilterSpec.register, it will be used before the default one.

Another approach by korpios is described in the comments.

Attachments

ticket-5833-against-newforms-admin-6477.diff (3.6 kB) - added by Honza_Kral on 10/29/07 10:29:24.
custom_filterspecs_plus_fieldless.patch (10.1 kB) - added by korpios on 01/18/08 13:15:08.
Custom FilterSpecs?, also allowing fieldless FilterSpecs?
5833-against-7875.patch (3.7 kB) - added by Honza_Kral on 07/10/08 03:52:31.
updated version of my simple patch,
5833-against-7875.2.patch (3.6 kB) - added by Honza_Kral on 07/10/08 10:27:29.
5833-against-7875.3.patch (3.7 kB) - added by Honza_Kral on 07/10/08 10:33:38.
filterspec_with_custom_queryset_against_1_0.diff (11.3 kB) - added by fas on 09/17/08 10:44:13.
Custom Filtersets (fieldless) with custom query set manipulation.
filterspec_with_custom_queryset_against_1_0_2.diff (11.4 kB) - added by gerdemb on 01/22/09 06:16:23.
5833-against-9820.patch (11.4 kB) - added by gerdemb on 02/08/09 09:05:50.
Patch updated to latest HEAD passing all tests
5833-against-9836-new-proper.patch (14.3 kB) - added by eandre@gmail.com on 02/16/09 12:22:02.
New patch against r9836
5833.patch (14.6 kB) - added by sciyoshi on 08/23/09 00:04:58.
New patch against 1.1/SVN

Change History

10/29/07 10:29:24 changed by Honza_Kral

  • attachment ticket-5833-against-newforms-admin-6477.diff added.

12/01/07 11:12:56 changed by jkocherhans

  • owner changed from nobody to jkocherhans.
  • needs_better_patch changed.
  • status changed from new to assigned.
  • needs_tests changed.
  • needs_docs changed.

I really like the idea behind this, but I'd need to review the code closer and won't take the time to do it right now since it's a new feature. I'd rather focus on bugs preventing newforms-admin from being used.

12/01/07 11:26:06 changed by Honza_Kral

Also see #3400 for another ideas about filters which could benefit from this scheme...

12/07/07 19:58:26 changed by brosner

  • keywords changed from newforms admin list_filter filterspec to nfa-someday list_filter filterspec.

This ticket isn't critical to merge newforms-admin into trunk. Tagging with nfa-someday.

12/26/07 12:25:58 changed by buriy

How about FilterSpec?.insert method to do prepend and FilterSpec?.register to do append? discussed somewhere, no?

01/18/08 13:14:04 changed by korpios

I'm attaching my crack at this issue; in particular, I wanted to allow custom FilterSpecs that aren't associated with a field. This way, you can throw together a filter for fairly arbitrary queries.

Much of the field-specific code from FilterSpec has been moved out to a subclass, FieldFilterSpec; that should be used as the superclass for custom field-based filterspecs, while FilterSpec can be used for non-field-based ones.

The list_filter syntax gains two further options besides field names: a FilterSpec subclass, or a tuple of ('field_name', FieldFilterSpecSubclass).

An example combining all three:

list_filter = (
    'field1',
    ('field2', SomeFieldFilterSpec),
    SomeFilterSpec,
)

01/18/08 13:15:08 changed by korpios

  • attachment custom_filterspecs_plus_fieldless.patch added.

Custom FilterSpecs?, also allowing fieldless FilterSpecs?

01/18/08 13:22:09 changed by korpios

  • cc set to korpios@korpios.com.

01/18/08 14:01:21 changed by korpios

  • description changed.
  • summary changed from newforms-admin enable registering custom FilterSpecs to [newforms-admin] Custom FilterSpecs.

Tweaked the summary and description.

03/03/08 21:07:04 changed by anonymous

  • stage changed from Unreviewed to Design decision needed.

03/03/08 21:08:37 changed by jacob

that was me; sorry.

03/19/08 00:28:26 changed by ales_zoulek

  • keywords changed from nfa-someday list_filter filterspec to nfa-someday list_filter filterspec nfa-changelist.

06/04/08 03:11:55 changed by RaceCondition <eallik@gmail.com>

  • cc changed from korpios@korpios.com to korpios@korpios.com, eallik@gmail.com.

07/10/08 03:52:31 changed by Honza_Kral

  • attachment 5833-against-7875.patch added.

updated version of my simple patch,

07/10/08 10:18:02 changed by Honza_Kral

  • keywords changed from nfa-someday list_filter filterspec nfa-changelist to nfa-someday list_filter filterspec nfa-changelist ep2008.

07/10/08 10:27:29 changed by Honza_Kral

  • attachment 5833-against-7875.2.patch added.

07/10/08 10:33:38 changed by Honza_Kral

  • attachment 5833-against-7875.3.patch added.

07/19/08 16:42:01 changed by Alex

  • version changed from newforms-admin to SVN.

(follow-up: ↓ 20 ) 08/14/08 22:21:13 changed by elwaywitvac <elwaywitvac@gmail.com>

  • needs_better_patch set to 1.
Honza_Kral: I modified the filterspec definition to allow for users to register their own filters in admin. The mechanism is simple - I just reverted the order of the registry so that newly registered specs will come first. That way if you register your own filter via FilterSpec.register, it will be used before the default one.

I'm not sure having a reversed registry is intuitive. It certainly makes overriding FilterSpecs? simple. Except if I were to register two FilterSpecs? I would expect them to be tested the order I add them, the same way it is done in the rest of Django. Maybe the FilterSpec?'s should be in a Priority Queue instead of a Queue?

I had created a solution which doesn't reverse the registry ticket:8330. But I'm realizing now that this wouldn't allow for overriding other filters like Boolean. I'll keep playing.

08/14/08 22:45:48 changed by elwaywitvac <elwaywitvac@gmail.com>

Suggestion: make FieldFilterSpec?'s similar to how widgets work in newforms admin.

08/20/08 16:07:27 changed by Guilherme M. Gondim <semente@taurinus.org>

  • cc changed from korpios@korpios.com, eallik@gmail.com to korpios@korpios.com, eallik@gmail.com, semente@taurinus.org.

08/21/08 11:05:27 changed by korpios

  • cc changed from korpios@korpios.com, eallik@gmail.com, semente@taurinus.org to eallik@gmail.com, semente@taurinus.org.

09/05/08 02:57:04 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se.

09/17/08 10:24:11 changed by fas

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com.

(in reply to: ↑ 14 ) 09/17/08 10:43:39 changed by fas

Based on korpios' idea I made a patch that takes the idea further. With korpios' current solution you can add custom filters but not play with the queryset. Filters only based on field lookups is too little for complex administrations.

I provide a patch which lets you add, like korpios' suggested, custom filters like this:

list_filter = (
    'field1',
    ('field2', SomeFieldFilterSpec),
    SomeFilterSpec,
)

Furthermore, every FilterSpec? can implement get_query_set:

def SomeFilterSpec:
    def get_query_set(self, cl, qs):
        if self.params.has_key("custom_get_parameter"):
            return qs.filter(somefield__startswith = self.params["custom_get_parameter"])

Note that this is a trivial example that can also be achieved with field lookup parameters. But there are no limits of how to filter the result set.

09/17/08 10:44:13 changed by fas

  • attachment filterspec_with_custom_queryset_against_1_0.diff added.

Custom Filtersets (fieldless) with custom query set manipulation.

09/23/08 03:57:40 changed by yuejie

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com.

10/08/08 19:56:35 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com.

10/08/08 20:08:44 changed by anonymous

line 103 of filterspec_with_custom_queryset_against_1_0.diff should read:

+        super(RelatedFilterSpec, self).__init__(request, params, model, model_admin, f)

12/12/08 09:58:24 changed by gerdemb

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net.

I believe there is a small bug with this patch. Line 31 of filterspec_with_custom_queryset_against_1_0.diff should be indented once more so that get_field() is only called when a field is defined in the list_filter. In the case that the list_filter item is a single callable item, the field variable is not set and get_field() should not be called for verification.

Also, any word on if this feature will make it into 1.1? I notice that there is no implemented listed on the status page. I'm using this feature frequently in my application, and would prefer to run a released version of Django instead of patching. :)

12/12/08 18:02:05 changed by niels

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com.

12/14/08 15:29:32 changed by xtrqt

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com.

01/22/09 06:16:23 changed by gerdemb

  • attachment filterspec_with_custom_queryset_against_1_0_2.diff added.

01/22/09 06:17:29 changed by gerdemb

New path is diff versus v1.0.2 of django and includes fixes mentioned in the following comments:

10/08/08 20:08:44 changed by anonymous ¶ 12/12/08 09:58:24 changed by gerdemb ¶

02/06/09 20:58:55 changed by kmike

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com, kmike84@gmail.com.

02/08/09 09:05:50 changed by gerdemb

  • attachment 5833-against-9820.patch added.

Patch updated to latest HEAD passing all tests

02/08/09 09:29:40 changed by gerdemb

I updated the patch to the latest HEAD and fixed the TODO comments. In order to pass the existing tests, I had to disable the use of custom GET params. In the original patch, the filterspec could consume a custom param and then return an arbitrary queryset based on this parameter, but to do this it silently removed the parameters that don't match a field name from the request. The problem is that there is a test to insure that any parameters that do not match field names are handled by forwarding to ?e=1 (testIncorrectLookupParameters) which failed when the previous patch silently removed them. Additionally, the code in the previous patch didn't handle filters on M2M relationships through an intermediate table because it assumed the first part of the search param would be a field name.

02/08/09 12:06:12 changed by gerdemb

02/16/09 12:19:34 changed by eandre@gmail.com

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com, kmike84@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com.
  • needs_better_patch deleted.
  • needs_tests set to 1.
  • stage changed from Design decision needed to Accepted.

I am attaching a new patch against the latest HEAD. It's based on gerdemb's patch but now allows for consuming of GET parameters to allow for custom, non-field based querystring keys. The patch also implements a priority queue in a sense; FieldFilterSpec?.register() allows you to pass in high_priority=True in order to register the FieldFilterSpec? as high priority. This argument is True by default but passed in as False for all default filter specs. High priority specs are inserted before normal priority specs, but order is preserved amongst the two separate groups. Let me know what you think of that solution.

I'm also moving this to Accepted since it's on the 1.1 features list (forgive me if this is an incorrect decision). Also flagging it as Needs tests.

02/16/09 12:22:02 changed by eandre@gmail.com

  • attachment 5833-against-9836-new-proper.patch added.

New patch against r9836

02/16/09 12:23:57 changed by eandre@gmail.com

Please see 5833-against-9836-new-proper.patch and not 5833-against-9836-new.patch; I accidently diffed some additional, unrelated changes, and couldn't get trac to replace the old attachment.

02/16/09 12:37:28 changed by kmtracey

I deleted the 5833-against-9836-new.patch to avoid confusion.

02/16/09 18:17:18 changed by gonz

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz.

02/17/09 04:51:34 changed by niels

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, niels.busch@gmail.com, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz.

02/28/09 13:45:02 changed by jacob

  • milestone set to 1.1 beta.

03/19/09 18:13:38 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi.

03/20/09 07:14:38 changed by rvdrijst

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst.

03/21/09 18:33:08 changed by kmtracey

  • needs_docs set to 1.
  • summary changed from [newforms-admin] Custom FilterSpecs to Custom FilterSpecs.

I don't see any documentation for this enhancement in any of the patches? Makes it hard to gets started on reviewing the code. In the absence of doc, tests would also at least show how the new function is intended to be used, but those too are still missing. If anyone who has worked on the patches here or has an interest in seeing this done could provide some of these missing pieces, that would help move this one along.

(follow-up: ↓ 41 ) 03/22/09 21:27:00 changed by jacob

  • milestone deleted.

Without docs and tests, and with 1.1 feature freeze coming up soon, this isn't going to make 1.1.

(in reply to: ↑ 40 ) 03/22/09 22:18:18 changed by Honza_Kral

Replying to jacob:

Without docs and tests, and with 1.1 feature freeze coming up soon, this isn't going to make 1.1.

I would like to get this committed, we can work on it during the PyCON sprint. It is really important for us that this ticket or #3400 gets into 1.1 and we are ready to put some work into it.

03/22/09 23:43:35 changed by brosner

The feature freeze is tomorrow. Only bug fixes will be happening during the sprints at PyCon. I'm afraid this is just going to have to wait until 1.2.

03/31/09 06:29:37 changed by mrts

  • milestone set to 1.2.

Re-targeting for 1.2.

07/17/09 16:55:05 changed by eppsilon

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon.

07/20/09 04:57:13 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com.

08/03/09 13:28:38 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru.

08/20/09 06:42:16 changed by marcob

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com.

08/21/09 09:48:17 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk.

08/22/09 22:55:45 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com.

08/23/09 00:04:38 changed by sciyoshi

The validation in the latest patch is broken. Attaching a new version against 1.1/SVN which also fixes #11771.

08/23/09 00:04:58 changed by sciyoshi

  • attachment 5833.patch added.

New patch against 1.1/SVN

08/23/09 02:52:25 changed by marcob

When you delete a record, querystring looses return_to_ parameter.

(BTW last patch seems not working for me)

08/25/09 20:15:20 changed by anonymous

Another place where it would be likeable to keep the filters are with admin actions

10/05/09 16:14:30 changed by velmont

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont.

10/06/09 08:29:05 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl.

11/28/09 13:24:15 changed by anonymous

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl.

12/09/09 16:17:30 changed by alexkoshelev

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl, alexkoshelev.

01/05/10 05:14:54 changed by marinho

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl, alexkoshelev to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl, alexkoshelev, marinho.

01/14/10 05:34:31 changed by danfairs

  • cc changed from eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl, alexkoshelev, marinho to eallik@gmail.com, semente@taurinus.org, andreas@pelme.se, mbencun@gmail.com, chenyuejie@gmail.com, bpederse@gmail.com, djangoproject@ibeni.net, jan.rzepecki@gmail.com, kmike84@gmail.com, eandre@gmail.com, gonz, ciantic@mbnet.fi, rvdrijst, eppsilon, ramusus@gmail.com, peimei@ya.ru, marcoberi@gmail.com, david@reynoldsfamily.org.uk, sciyoshi@gmail.com, velmont, seanl, alexkoshelev, marinho, danfairs.

01/28/10 08:13:51 changed by vrehak

Just a small note: the patch 5883.patch should be modified in django/contrib/admin/views/main.py, line 200.

Currently it reads:

if new_qs: 

which fails if new_qs is empty QuerySet? (i.e. the filters output is empty). It works for me if I change it to

if new_qs is not False: 

02/05/10 07:38:21 changed by russellm

#12173 raised the issue of ORs in filterspecs.


Add/Change #5833 (Custom FilterSpecs)




Change Properties
Action