From 31eae0aee3a6ae9fa7abea312ff1ea843a98e853 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 4 Feb 2016 09:25:18 -0800 Subject: [PATCH] Improve Django field conversion real-life tests --- graphene/contrib/django/tests/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphene/contrib/django/tests/models.py b/graphene/contrib/django/tests/models.py index 956d70af..8f06dbd8 100644 --- a/graphene/contrib/django/tests/models.py +++ b/graphene/contrib/django/tests/models.py @@ -26,6 +26,10 @@ class Article(models.Model): headline = models.CharField(max_length=100) pub_date = models.DateField() reporter = models.ForeignKey(Reporter, related_name='articles') + lang = models.CharField(max_length=2, help_text='Language', choices=[ + ('es', 'Spanish'), + ('en', 'English') + ], default='es') def __str__(self): # __unicode__ on Python 2 return self.headline