[Answered ]-Is there a way to call a function in ListView?

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)
👤Brobin

Leave a comment