[Django]-Lookup_field Return None In Django get_queryset

2👍

I found the answer:

Remove this line from class:

lookup_field = 'phone_number'

Get the lookup_field in get_queryset, like this:

phone_number = self.kwargs.get('phone_number')
👤Ali Rn

Leave a comment