How do I access the "parameter" word in the url:
operations_product_search/?q=parameter
here:
class ASearchView(ListView):
...
def get_queryset(self, **kwargs):
q = self.kwargs["q"] <--- This is not working
It should be self.request.GET['q']
.
I get query parameters using query_params
def get_queryset(self):
q = self.request.query_params.get('q', None)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With