Yesterday I ran into a problem when I was trying to create a special filter for my admin site in Django.
I have 3 models:
class ShopInfo(models.Model):
name = models.CharField(max_length=200)
class Keyword(models.Model):
keyword1 = models.CharField(max_length=4096, blank=True)
product = models.ManyToManyField(Products)
class Products(models.Model):
shop = models.ForeignKey(ShopInfo)
code>In the "Admin" section of the keyword editing page, I want to create a filter for keywords by shopping. In other words, I want to see the full list of stores in the filter list to the right of the page, when you click on it, we will select the keywords belonging to this store.
source
share