I have the following models in models.py
:
class ListinoTraduttore(models.Model):
traduttore = models.ForeignKey(\'Traduttore\', related_name=
This error, mostly occurs when you try to filter using a ForeignKey. I think the error is in the search_filelds. Check it. search_fields = ['traduttore__nome", "linguaDa", "linguaA"]. This two ForeignKey ("linguaDa", "linguaA") are the problem. Remove them. I think this helps.
Have you tried adding the __fieldname
on those Lingua
references in the ListinoTraduttoreAdmin
search_fields, like:
class ListinoTraduttoreAdmin(admin.ModelAdmin):
list_display = ("traduttore", "linguaDa", "linguaA", "prezzoParola", "prezzoRiga", "scontoCat", "scontoFuzzy", "scontoRipetizioni")
search_fields = ['traduttore__nome", "linguaDa__field1", "linguaA_field2"]