Ticket #15009: models.py

File models.py, 392 bytes (added by Saverio Trioni <strioni@…>, 14 years ago)
Line 
1from django.db import models
2
3
4class First(models.Model):
5 condition = models.BooleanField()
6
7
8class Second(models.Model):
9 pass
10
11
12class BaseModel(models.Model):
13 firsts = models.ManyToManyField(First)
14 seconds = models.ManyToManyField(Second)
15
16
17class Third(models.Model):
18 second = models.ForeignKey(Second, related_name='thirds')
19 condition = models.BooleanField()
20
Back to Top