Closed jrlegrand closed 4 years ago
@jrlegrand Would you like to fix the styling errors or would you like me to do it?
0.53s$ flake8
./api/dailymed/filters.py:4:1: E302 expected 2 blank lines, found 1
./api/dailymed/filters.py:7:80: E501 line too long (100 > 79 characters)
./api/dailymed/filters.py:8:80: E501 line too long (90 > 79 characters)
./api/dailymed/filters.py:9:80: E501 line too long (91 > 79 characters)
./api/dailymed/filters.py:10:80: E501 line too long (125 > 79 characters)
./api/dailymed/filters.py:11:80: E501 line too long (125 > 79 characters)
./api/dailymed/filters.py:12:80: E501 line too long (88 > 79 characters)
./api/dailymed/views.py:11:1: E302 expected 2 blank lines, found 1
I'll give it a shot tomorrow morning.
@jrlegrand Two pending styling errors:
$ flake8
./api/dailymed/filters.py:13:1: E302 expected 2 blank lines, found 1
./api/dailymed/filters.py:27:37: W291 trailing whitespace
Fixes coderxio/dailymed-api#30, fixes coderxio/dailymed-api#34
Explanation
Added Django Filters functionality for SPL view and made the SPL view distinct by adding distinct=True to the individual filter elements. Also made schedule a multiple select and added SCHEDULE_OPTIONS.
Rationale
So users can filter down to only the SPLs they care about. Alternatives considered were using GraphQL-type functionality, which we may implement later on.
Tests