-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Standardize quotation marks and formatting across multiple fil…
…es; remove dangling file
- Loading branch information
1 parent
e014057
commit d941911
Showing
22 changed files
with
277 additions
and
709 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# apps/trains/api/filters.py | ||
|
||
from django_filters import rest_framework as filters | ||
|
||
from ..models import Train | ||
|
||
|
||
class TrainFilter(filters.FilterSet): | ||
line = filters.CharFilter(field_name='line__name', lookup_expr='icontains') | ||
status = filters.CharFilter(field_name='status') | ||
has_ac = filters.BooleanFilter(field_name='has_air_conditioning') | ||
line = filters.CharFilter(field_name="line__name", lookup_expr="icontains") | ||
status = filters.CharFilter(field_name="status") | ||
has_ac = filters.BooleanFilter(field_name="has_air_conditioning") | ||
|
||
class Meta: | ||
model = Train | ||
fields = ['line', 'status', 'has_ac'] | ||
fields = ["line", "status", "has_ac"] |
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
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
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
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
Oops, something went wrong.