I have the following model setup:
The problem is that when I try to pull the object up in the admin page, computer_names links to several hundred thousand rows that aren't relevant and the page never loads. How can I filter computer_names to only the user selected objects for the ManyToMany field?
class ScoringException(models.Model):
class Meta:
ordering = ['date_modified']
requester = models.CharField('Requester',max_length=50,null=False,blank=False)
computer_names = models.ManyToManyField(Computer)
domain = models.ForeignKey(Domain)
exception_kpi_types = models.ManyToManyField(ScoringType)
expiration_date = models.DateField('Expiration Date')
reason = models.CharField('Reason',max_length=1000,null=False,blank=False)
approved = models.BooleanField('Approved')
date_modified = models.DateTimeField('Date Updated',auto_now=True)