Question: I have seen the solution for a default choice field. [Default filter in Django admin](https://stackoverflow.com/questions/851636/default-filter-in-django-admin)

It's not obvious how to extend that to a boolean field. I have an archive field that keeps things from being displayed. I'd like the default filter to be No instead of All.

Answer: 
```
class BooleanDefaultNoFilter(SimpleListFilter):
    def lookups(self, request, model_admin):
        return (
            ('all', 'All'),
            (1, 'Yes'),
            (None, 'No')
        )

    def choices(self, changelist):
        for lookup, title in self.lookup_choices:
            yield {
                'selected': self.value() == (str(lookup) if lookup else lookup),
                'query_string': changelist.get_query_string({self.parameter_name: lookup}, []),
                'display': title,
            }

    def queryset(self, request, queryset):
        if self.value():
            if self.value() == 'all':
                return queryset
            else:
                return queryset.filter(**{self.parameter_name: self.value()})

        elif self.value() == None:
            return queryset.filter(**{self.parameter_name: False})

class NamedFilter(BooleanDefaultNoFilter):
    title = _('InsertName')
    parameter_name = 'insertname'

class InsertNameAdmin(admin.ModelAdmin):
      list_filters = (NamedFilter)

```
Overriding the `get_queryset` method from [django.contrib.admin.ModelAdmin](https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_queryset) is one way to solve this problem.

This method allows you to specify what object to return when requesting that resource from the admin site.

```
class MyModelAdmin(admin.ModelAdmin):
    def get_queryset(self, request):
        qs = super(MyModelAdmin, self).get_queryset(request)
        # Here's where we specify what to filter our queryset by.
        return qs.filter(archived=False) 

```