According to the documentation:
Field.choices
An iterable (e.g., a list or tuple) consisting itself of iterables of exactly two items (e.g. [(A, B), (A, B) ...]) to use as choices for this field. If this is given, the default form widget will be a select box with these choices instead of the standard text field.
The first element in each tuple is the actual value to be stored, and the second element is the human-readable name.
So, your code is correct, except that you should either define variables JANUARY
, FEBRUARY
etc. or use calendar
module to define MONTH_CHOICES
:
import calendar
...
class MyModel(models.Model):
...
MONTH_CHOICES = [(str(i), calendar.month_name[i]) for i in range(1,13)]
month = models.CharField(max_length=9, choices=MONTH_CHOICES, default='1')