Wednesday, November 24, 2021

def post in ListView

Hi everyone,

Is there anything dangerous about this?
class ItemList(ListView):
    model = Item
    def post(self, request, *args, **kwargs):
        self.request.GET = self.request.POST
        return super().get(request, *args, **kwargs)

I want to use this to accept filtering parameters from a form in a list view template. This ListView also has a get_queryset which returns a filtered query based on the parameters

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment