Re: searching a model in admin with data from a related model

2011-02-26 Thread natebeacham
Yes, as far as I know if CustomerId was changed to: customer = models.ForeignKey(Customer) You would be able to say: search_fields = ['barcode', 'customer__first_name', 'customer__last_name'] ...on your Tracker's ModelAdmin. Cheers On Feb 25, 5:54 pm, Bobby Roberts wrote: > consider this mod

searching a model in admin with data from a related model

2011-02-25 Thread Bobby Roberts
consider this model (only a portion of it): class Tracker (models.Model): id = models.AutoField (primary_key=True) Barcode = models.IntegerField(unique = True, blank=False) OrderId = models.IntegerField(blank=False) CustomerId = models.CharField (max_length=20, blan