Ticket #15009: models.py
File models.py, 392 bytes (added by , 14 years ago) |
---|
Line | |
---|---|
1 | from django.db import models |
2 | |
3 | |
4 | class First(models.Model): |
5 | condition = models.BooleanField() |
6 | |
7 | |
8 | class Second(models.Model): |
9 | pass |
10 | |
11 | |
12 | class BaseModel(models.Model): |
13 | firsts = models.ManyToManyField(First) |
14 | seconds = models.ManyToManyField(Second) |
15 | |
16 | |
17 | class Third(models.Model): |
18 | second = models.ForeignKey(Second, related_name='thirds') |
19 | condition = models.BooleanField() |
20 |