mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Moved choices inside of test models per coding style.
This commit is contained in:
parent
f0082b9a77
commit
3a4558b84f
4 changed files with 27 additions and 34 deletions
|
@ -1,17 +1,16 @@
|
|||
|
||||
from django.db import models
|
||||
|
||||
GENDER_CHOICES = (
|
||||
('M', 'Male'),
|
||||
('F', 'Female'),
|
||||
)
|
||||
|
||||
|
||||
class Account(models.Model):
|
||||
num = models.IntegerField()
|
||||
|
||||
|
||||
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)
|
||||
pid = models.IntegerField(null=True, default=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue