title: Django m2m through model with classic admin widget
body: <p>I need to customise a through model of a many-to-many relationship, the customisation is subtle, because the user won't need do act manually, I try to explain myself better by explaining my use case with the following pseudo code:</p>
  
  <pre><code>RouterConfiguration
  - vpn (many-to-many through VpnClient)
  # other fields
  
  VpnClient
  - router: ForeignKey to RouterConfiguration
  - vpn: ForeignKey to Vpn
  - cert: ForeignKey to Cert
  
  Vpn
  # other fields
  
  Cert
  # (stores x509 certificates)
  # other fields
  </code></pre>
  
  <p>The through model <code>VpnClient</code> has only one additional field, a <code>ForeignKey</code> to <code>Cert</code>, but I want <code>VpnClient</code> to automatically create a <code>Cert</code> instance without user interaction and until here there is no problem.</p>
  
  <p>The problem comes in the Django Admin, because as far as I understood, it is not possible to use the classic many2many widget when using a through model:</p>
  
  <blockquote>
    <p>When you specify an intermediary model using the through argument to a
    <code>ManyToManyField</code>, the admin will not display a widget by default. This
    is because each instance of that intermediary model requires more
    information than could be displayed in a single widget, and the layout
    required for multiple widgets will vary depending on the intermediate
    model.</p>
  </blockquote>
  
  <p>Reference: <a href="https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#working-with-many-to-many-intermediary-models" rel="nofollow">https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#working-with-many-to-many-intermediary-models</a></p>
  
  <p>But I don't want the user to insert any extra information. I just want to be able to control the model so it can perform a series of actions automatically.</p>
  
  <p>So my question is: is it possible to have the classic admin widget with a custom through model? If there's no easy solution maybe I could try with a custom widget? Or maybe there is an alternative way to accomplish what I need?</p>
  
  <p><strong>PS</strong>: apparently there's a ticket for this use case: <a href="https://code.djangoproject.com/ticket/12203" rel="nofollow">https://code.djangoproject.com/ticket/12203</a></p>