You can use an IntegerField with choices https://docs.djangoproject.com/en/1.7/ref/models/fields/#choices
On Mon, Mar 23, 2015 at 4:28 PM, Daniel Grace <danwgr...@gmail.com> wrote: > How to create a field with multiple values? For example an integer field > that takes on particular values: > > state = models.IntegerField() > > ... where state=0 represents 'pending', state=1 represents 'accepted' and > state=2 represents 'rejected'. > Is it possible to put these values / constants into the model? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/0ffb0a31-d900-4b62-826b-b779bab472a2%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/0ffb0a31-d900-4b62-826b-b779bab472a2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei1X%2Bam5Mdwq6Upz_CCnEaea8XaZkKbEnpHL3MC25CrmJQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.