I have the following models in models.py
:
class ListinoTraduttore(models.Model):
traduttore = models.ForeignKey(\'Traduttore\', related_name=
This is to (hopefully) simplify the answer.
Don't filter on a ForeignKey field itself!
Change this
search_fields = ['foreinkeyfield']
to (notice TWO underscores)
search_fields = ['foreinkeyfield__name']
name
represents the field-name from the table that we have a ForeinKey relationship with.
Hope this helps