title: DJANGO - simple-history - how to look up history table from base model using standard django ORM lookup
body: <p>This is probably a simple answer but I cant find a solid "yes" or "no" on the subject. I am using Django <a href="https://github.com/treyhunner/django-simple-history" rel="nofollow noreferrer">simple-history</a> and I am trying to filter the base model objects by information in the history table. Because simple-history generates the history table automatically, and I didn't create a history model for it per-se I dont know if the django ORM lookup syntax works here. My table relations look like <a href="https://gyazo.com/7caf69062e5ea0ac2f1a311cffbc8e74" rel="nofollow noreferrer">this</a>. Here's the model:</p>
  
  <pre><code>class RepairForm(models.Model):
  user_id = models.ForeignKey(User, on_delete=models.DO_NOTHING,)
  return_number = models.CharField(max_length=200, unique=True)
  incident = models.CharField(max_length=100, blank=True)
  ...
  # Simple-history
  history = HistoricalRecords()
  </code></pre>
  
  <p>And I am trying to filter RepairForm objects by their history. As an example; there is a field in only the history table called "history_change_reason." It's just a field for saving a string that (ideally) describes why the update happened. Referencing the table image I linked, I thought I could filter down RepairForm objects using the RepairFormHistory table by traversing the relationship they both had with the user table. Something like:</p>
  
  <pre><code>RepairForm.objects.filter(user_id__repairformhistory__history_change_reason='Custom Repair form page')
  </code></pre>
  
  <p>"repairformhistory" was my best guess as to what the history model (if there is one) is called. The error:</p>
  
  <pre><code> Related Field got invalid lookup: repairformhistory
  </code></pre>
  
  <p>Am I way off base here? Can I traverse a relationship like that? even though there is no model for "repairformhistory," just a table linked to the original through a user?</p>