Set Up and Create Filter

Follow step-by-step instructions to set up a filter that allows users to look for specific listings on the Listings page.

We'll cover the following

We will add a filter to allow users to look for specific listings on the Listings page so that users don’t have to keep scrolling down until they hit the end of the page.

Django filter setup

django-filter can be installed by issuing the following command:

pip install django-filter

You don’t need to install it because we have already set it up for your convenience.

Next, add the django_filters package to the INSTALLED_APPS section in settings.py.

Get hands-on with 1200+ tech skills courses.