I have these two models below: class business(models.Model): name=models.CharField(max_length=40, blank=True, null=True) class phone(models.Model): business=models.ForeignKey(business, verbose_name='Business',blank=False) phone=models.CharField(max_length=40, blank=True, null=True)
in the admin.py class businessAdmin(admin.ModelAdmin): model=business search_fields = phone__phone How do we make this search work fine ? Ie, bring me all companies that possess the phone number entered by the User in the search of the form (Admin). ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce286f0d-ece0-4897-af50-c0d9e1417f37%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.