Skip to content

Instantly share code, notes, and snippets.

@ktechmidas
Created November 30, 2020 10:05
Show Gist options
  • Save ktechmidas/f3cb553c8abb835ff97c62b55338056f to your computer and use it in GitHub Desktop.
Save ktechmidas/f3cb553c8abb835ff97c62b55338056f to your computer and use it in GitHub Desktop.
class FlightTable(tables.Table):
class Meta:
model = Flight
class FlightFilter(django_filters.FilterSet):
class Meta:
model = Flight
fields = ['ff_from__fullname']
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