Re: how to, complex filters in admin

2009-08-03 Thread prabhu S
Right. If you are looking for more complex queries take a look at Q http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects On Aug 3, 6:40 pm, selcukcihan wrote: > I need to get the filtering criteria from the request, is that right? > > On

Re: how to, complex filters in admin

2009-08-03 Thread selcukcihan
I need to get the filtering criteria from the request, is that right? On Aug 3, 2:24 pm, Peter Bengtsson wrote: > Untested but should work (in admin.py): > > class ThingAdmin(admin.ModelAdmin): >     def queryset(self, request): >         qs = super(ThingAdmin,

Re: how to, complex filters in admin

2009-08-03 Thread Peter Bengtsson
Untested but should work (in admin.py): class ThingAdmin(admin.ModelAdmin): def queryset(self, request): qs = super(ThingAdmin, self).queryset(request) qs = qs.filter(some_integer_field__gt=10) return qs admin.site.register(Thing, ThingAdmin) On 3 Aug, 10:52,

how to, complex filters in admin

2009-08-03 Thread selcukcihan
Hi, is there a ready to go solution within django for providing complex filters(besides the date filters and others) on models within the admin? For instance, there is a model with an integer field, i would like to be able to apply filters of the form "greater than or equal to" or "between this