Last active
April 1, 2016 22:38
-
-
Save craigderington/ec75d53dba1d70e4e83fe936077d5442 to your computer and use it in GitHub Desktop.
Django Filters - FilterSet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# filters.py | |
import django_filters | |
from .models import Customer | |
class CustomerListFilter(django_filters.FilterSet): | |
class Meta: | |
model = Customer | |
fields = ['account_number', 'customer_first_name', 'customer_last_name', | |
'primary_phone', 'city', 'state', 'customer_email'] | |
order_by = ['pk'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment