Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1from django_filters import rest_framework as filters 

2 

3from .models import Machine, Event 

4 

5 

6class MachineFilter(filters.FilterSet): 

7 class Meta: 

8 model = Machine 

9 fields = ('ready_for_service', ) 

10 

11 

12class EventFilter(filters.FilterSet): 

13 since = filters.DateTimeFilter(field_name='date', lookup_expr='gt') 

14 

15 class Meta: 

16 model = Event 

17 fields = ('since', )