I am trying to make search for a string through all the fielsd of one table in my models. I tried to use the "._meta.fields" django trick, but it gives me back all the fields, including the Foregn Key fields. How can I exclude these ? And get only the "local" fields from a table ?
for example I have :
class Info(models.Model):
concerning = models.ForeignKey(User)
name = models.CharField(max_length=100 , blank=True)
value = models.CharField(max_length=1000, blank=True)
creation_date = models.DateTimeField(auto_now_add=True)
And I want to get : ( name , value, creation_date)
I had a look to these pages but could not find a way:
https://code.djangoproject.com/wiki/new_meta_api
Search multiple fields of django model without 3rd party app