I need to get the filtering criteria from the request, is that right?
On Aug 3, 2:24 pm, Peter Bengtsson <pete...@gmail.com> wrote:
> 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, selcukcihan <selcukci...@gmail.com> wrote:
>
> > 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 and that"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---