equal
deleted
inserted
replaced
|
1 """ |
|
2 Tests for defer() and only(). |
|
3 """ |
|
4 |
|
5 from django.db import models |
|
6 |
|
7 |
|
8 class Secondary(models.Model): |
|
9 first = models.CharField(max_length=50) |
|
10 second = models.CharField(max_length=50) |
|
11 |
|
12 class Primary(models.Model): |
|
13 name = models.CharField(max_length=50) |
|
14 value = models.CharField(max_length=50) |
|
15 related = models.ForeignKey(Secondary) |
|
16 |
|
17 def __unicode__(self): |
|
18 return self.name |
|
19 |
|
20 class Child(Primary): |
|
21 pass |
|
22 |
|
23 class BigChild(Primary): |
|
24 other = models.CharField(max_length=50) |