Filtering and Searching

Learn how to filter and search your model on the Django admin page.

We'll cover the following


To add a filter, you can use the list_filter instruction. For instance, you can use this instruction to filter results by Author in your Question change page, so that, when selected, only the questions related to the specific author are displayed.

list_filter = ('refAuthor',)

You will find a display like the one shown below. From the right side of the display page, you can select the specific author to filter results accordingly.

Get hands-on with 1200+ tech skills courses.