1👍
✅
It looks like you want to fetch the predio_id
from the URL, and use it to fetch the object. You can do that with the following:
def get_object(self):
return get_object_or_404(CreditoPredio, predio_id=self.kwargs['predio_id'])
Source:stackexchange.com