I am trying to implement search functionality for the user in Django.
I can use Q
for one table search but here the scenerio is different.
Here are my models:
Class Profile(models.Model)
name = models.OnoeToOneField(User)
category = models.ForeignKey(Category)
Tags = models.ForeignKey(Tags)
class Category(models.Model)
name = models.Charfield(max_length = 100)
sub_cat = models.ForeignKey(SubCategory)
I want to search a user who belongs to a categoey and/or a tag
But I am unable to find a way to do this. I don't want to use Haystack or Whoosh.
Please suggest to me some simple way to achieve this.