If you are using Foreingkey in the field you are querying, use the field name in the connected model with __.
For example :
students__icontains=q
in its place
students__name__icontains=q
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket