I want to search multiple fields in many models. I don't want to use other apps like 'Haystack', only pure Django. For example:
# models.py
class Person(models.Model):
first_name = models.CharField("First name", max_length=255)
last_name = models.CharField("Last name", max_length=255)
# other fields
class Restaurant(models.Model):
restaurant_name = models.CharField("Restaurant name", max_length=255)
# other fields
class Pizza(models.Model):
pizza_name = models.CharField("Pizza name", max_length=255)
# other fields
When I type "Tonny" I should get a:
- "Tonny Montana" from
Personmodel - "Tonny's Restaurant" from
Restaurantmodel - "Tonny's Special Pizza" from
Pizzamodel.