title: Django - Select items and quantity from pre-created list
body: <p>I cannot figure out a suitable solution for what I believe is a beginner problem. Any help is highly appreciated.</p>
  
  <p>The website I am building will be used to plan parties. Two types of people will use it, party organizers and party visitors.
  The party organizers are able to create a party and select items to be offered to visitors. Items are food and drinks, 1 item = one pizza or one beer. </p>
  
  <p>Users will then be able to confirm participation for the party and select which food and drinks they would like to order and how many. 
  I already created authentication and creation of a party. </p>
  
  <p>Now, my issues are this: </p>
  
  <ol>
  <li>How can the organizer create a list of items to be offered to the
  visitor?</li>
  <li>How can the visitor select <strong>both</strong> type of item and quantity?</li>
  </ol>
  
  <p>I have tried with the following code (trimmed down):</p>
  
  <p><strong>models.py:</strong></p>
  
  <pre><code>class ItemType(models.Model):
      """Create items (food and drinks)."""
      name = models.CharField()
  
  class Party(models.Model):
      """Create a party."""
      organizer = models.ForeignKey(User)
      party_name = models.CharField()
      items_to_be_offered = models.ManyToManyField(ItemType)
  
  class PartyRegistration(models.Model):
      """Register for a party / create party registration."""
      party = models.ForeignKey(Party)
      visitor = models.CharField()
      selected_items = models.ManyToManyField()
  
  class ItemSelection(models.Model):
      """Specify which items and number of items the visitor selected."""
      party_registration = models.OneToOneField(PartyRegistration)
      item_type = models.ManyToManyField(ItemType)
      item_quantity = models.PositiveIntegerField()
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class VisitorRegisterForm(forms.ModelForm):
      """Form to register a visitor."""
  
      class Meta:
          model = PartyRegistration
          fields = ['visitor', 'selected_items']
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def VisitorRegister(request, pk):
      """Register Visitor to a specific party."""    
      party = get_object_or_404(Party, pk=pk)    
  
      if request.method == 'POST':
          form = VisitorRegisterForm(request.POST)
          if form.is_valid():
              name_clean = form.cleaned_data['visitor']
              registration = PartyRegistration(party=party, visitor=name_clean)
              registration.save()
              return HttpResponseRedirect(reverse('index'))
      else:
          form = VisitorRegisterForm()
  
      context = {'form': form, 'party': party}
  
      return render(request, 'visitor-register.html', context)
  </code></pre>
  
  <p>Website is Django 2.0, PostgreSQL.</p>