2👍
✅
Sure, just override one of the methods when you want to run it, then call super to continue with normal execution of the ListView
class AccessPointList(generic.ListView):
model = AccessPoint
def get(self, request, *args, **kwargs):
# call your function
return super().get(request, *args, **kwargs)
Source:stackexchange.com