Skip to content

Commit 31eae0a

Browse files
committed
Improve Django field conversion real-life tests
1 parent 191d9c6 commit 31eae0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphene/contrib/django/tests/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class Article(models.Model):
2626
headline = models.CharField(max_length=100)
2727
pub_date = models.DateField()
2828
reporter = models.ForeignKey(Reporter, related_name='articles')
29+
lang = models.CharField(max_length=2, help_text='Language', choices=[
30+
('es', 'Spanish'),
31+
('en', 'English')
32+
], default='es')
2933

3034
def __str__(self): # __unicode__ on Python 2
3135
return self.headline

0 commit comments

Comments
 (0)