1
0
mirror of https://github.com/django/django.git synced 2025-10-28 16:16:12 +00:00

Moved choices inside of test models per coding style.

This commit is contained in:
Manan
2018-12-10 19:58:49 +05:30
committed by Tim Graham
parent f0082b9a77
commit 3a4558b84f
4 changed files with 27 additions and 34 deletions

View File

@@ -11,13 +11,12 @@ field. This method returns the "human-readable" value of the field.
from django.db import models
GENDER_CHOICES = (
('M', 'Male'),
('F', 'Female'),
)
class Person(models.Model):
GENDER_CHOICES = (
('M', 'Male'),
('F', 'Female'),
)
name = models.CharField(max_length=20)
gender = models.CharField(max_length=1, choices=GENDER_CHOICES)