title: Create with inline in Django
body: <p>I have two related models Train and Passenger in Django 1.7.</p>
  
  <p>The passenger model has a ForeignKey to Train.</p>
  
  <p>I want to make a view to create passengers and choose in which train the passenger should be placed. The problem is that sometimes the train already exists and other times it needs to be created.</p>
  
  <p>How can I do all this in the same view?</p>
  
  <p>I think I both need a <code>&lt;select&gt;</code> element to choose a train and all the input elements to create train. If an option is selected in the <code>&lt;select&gt;</code> element then all the input fields for createing the train will be disabled with javascript.</p>
  
  <p>Is this the best approach to my problem?</p>