title: Django Foreign Key to Many to Many Table
body: <p>I need help in setting up my models correctly.  Say I have three models:</p>
  
  <ul>
  <li>Account</li>
  <li>Owner</li>
  <li>Transaction</li>
  </ul>
  
  <p>Account and Owners are many to many, so:</p>
  
  <pre><code>class Account(models.Model):
      number = models.CharField(max_length=10)
  
  class Owner(models.Model):
      account = models.ManyToManyField(Account)
      fullName = models.TextField()
  </code></pre>
  
  <p>Then, an "AccountOwner" can make many transactions.  So, if my wife and I have the same account, I can make a many transactions for t, and she can.</p>
  
  <p>My first attempt at a transaction model:</p>
  
  <pre><code>class Transaction(models.Model):
      #Does not work - Could pick account owner is not on
      account = models.ForeignKey(Account)
      owner = models.ForeignKey(Owner)
      title = models.CharField('title', max_length=50)
  </code></pre>
  
  <p>Two foreign keys do not work.  I need one foreign key on the account_owner table.  Can I do this without creating an actual account_owner model?</p>
  
  <p>Thank you for your time</p>