Created
December 3, 2020 13:48
-
-
Save ktechmidas/96682421a9256779f0595bba782cf648 to your computer and use it in GitHub Desktop.
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
class FlightTable(tables.Table): | |
class Meta: | |
model = Flight | |
class FlightFilter(django_filters.FilterSet): | |
class Meta: | |
model = Flight | |
fields = {"ff_from__fullname": ["icontains"]} | |
label = "Search location or flight number" | |
class FlightTableView(SingleTableMixin, FilterView): | |
table_class = FlightTable | |
model = Flight | |
template_name = 'pages/flightlist.html' | |
filterset_class = FlightFilter | |
#edit = TemplateColumn(template_name='pages/tables/training_update_column.html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment