title: how to create dropdown menu in django
body: <p>I'm new to django and would like to create a drop down menu for options. I'm confused as to what I should include in my forms.py and how to call that form on my index.html. </p>
  
  <p>My forms.py</p>
  
  <pre><code>    from django import forms
  
      class MyModel2(forms.Form):
         class Meta:
             model = MyModel
             fields = ['color']
  </code></pre>
  
  <p>My index.html</p>
  
  <pre><code>    &lt;form method="POST" action = ""&gt;{% csrf_token %}
  
              &lt;p&gt;Choose color&lt;/p&gt; {{ form.color}}
              &lt;br&gt;&lt;br&gt;
              &lt;input type="submit" value="Submit!"/&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>My models.py</p>
  
  <pre><code>    from __future__ import unicode_literals
  
      from django.db import models
  
      COLOR_CHOICES = (
         ('green','GREEN'),
         ('blue', 'BLUE'),
         ('red','RED'),
         ('orange','ORANGE'),
         ('black','BLACK'),
      )
  
      class MyModel(models.Model):
          color = models.CharField(max_length=6, choices=COLOR_CHOICES, default='green')
  </code></pre>
  
  <p>Thank you!</p>