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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user