Skip to content

Commit

Permalink
Add common time span filters
Browse files Browse the repository at this point in the history
  • Loading branch information
eheinrich committed Oct 14, 2019
1 parent d1381b9 commit fd21ae6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions observation_portal/observations/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class ObservationFilter(mixins.CustomIsoDateTimeFilterMixin, django_filters.Filt
label='Start after',
widget=forms.TextInput(attrs={'class': 'input', 'type': 'date'})
)
time_span = django_filters.DateRangeFilter(
field_name='start',
label='Time Span'
)
start_before = django_filters.IsoDateTimeFilter(
field_name='start',
lookup_expr='lt',
Expand Down

0 comments on commit fd21ae6

Please sign in to comment.