title: How to convert number to month name in Django?
body: <p><a href="https://i.stack.imgur.com/eMOdi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eMOdi.png" alt="enter image description here"></a></p>
  
  <p>This is what my dropdown list looks like</p>
  
  <p><a href="https://i.stack.imgur.com/UVgwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UVgwl.png" alt="enter image description here"></a></p>
  
  <p>How do I convert the number into a month name? </p>
  
  <p>Because when you sort the data with dropdown user wants to see the month name not the numbers</p>
  
  <p>I used strftime and still getting error.</p>
  
  <p>This is my form which I used to add the data that is the date which is in database: </p>
  
  <pre><code>  &lt;form method="POST" id="personForm" data-cities-url="{% url 'users:ajax_load_cities' %}" enctype="multipart/form-data"&gt;
     {% csrf_token %}
      &lt;fieldset class="form-group pr-4"&gt;
          &lt;legend class="mb-4"&gt;Report Form&lt;/legend&gt;
              &lt;div class="form-row"&gt;
                   &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.area|as_crispy_field }}
                    &lt;/div&gt;
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.country|as_crispy_field }}
                    &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
                    &lt;div class="form-group col-md-6 mb-0"&gt;
                      {{ form.month|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
  
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.new_ministers|as_crispy_field }}
                    &lt;/div&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.dis_course|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.licenced_ministers|as_crispy_field }}
                    &lt;/div&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.upgrade_licence|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.preaching_place|as_crispy_field }}
                    &lt;/div&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.new_churches|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.water_baptism|as_crispy_field }}
                    &lt;/div&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.holy_ghost|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.constituents|as_crispy_field }}
                    &lt;/div&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.total_holy_ghost|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.total_baptized|as_crispy_field }}
                    &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;div class="form-row"&gt;
  
                    &lt;div class="form-group col-md-3 mb-0"&gt;
                      {{ form.author }}
                      &lt;p class="text-danger"&gt;If you choose wrong name, your info will not be saved&lt;/p&gt;
                    &lt;/div&gt;
  
              &lt;/div&gt;
  
  
      &lt;/fieldset&gt;
     &lt;div class="form-group"&gt;
       &lt;button style="border-radius: 0; width: 200px; padding-left: 4px;" class="btn btn-info btn-block" type="submit"&gt;Submit&lt;/button&gt;
     &lt;/div&gt;
   &lt;/form&gt;
  </code></pre>