diff options
| author | Tim Graham <timograham@gmail.com> | 2013-08-01 14:09:47 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-02 08:42:19 -0400 |
| commit | 196cc875b26f266e8f8dfd5be9daa0b8f246b9cd (patch) | |
| tree | 6de2bf6cb866c024fc9148d8beca8355d9290ea0 /tests/backends/models.py | |
| parent | b3e54f4a01dd410a87bc3d0669cb7b36aa74e7a8 (diff) | |
[1.6.x] Fixed #17519 -- Fixed missing SQL constraints to proxy models.
Thanks thibaultj for the report, jenh for the patch,
and charettes for the tests.
Backport of aa830009de from master
Diffstat (limited to 'tests/backends/models.py')
| -rw-r--r-- | tests/backends/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/backends/models.py b/tests/backends/models.py index 4f03ddeacc..1508af4354 100644 --- a/tests/backends/models.py +++ b/tests/backends/models.py @@ -68,11 +68,18 @@ class Reporter(models.Model): return "%s %s" % (self.first_name, self.last_name) +class ReporterProxy(Reporter): + class Meta: + proxy = True + + @python_2_unicode_compatible class Article(models.Model): headline = models.CharField(max_length=100) pub_date = models.DateField() reporter = models.ForeignKey(Reporter) + reporter_proxy = models.ForeignKey(ReporterProxy, null=True, + related_name='reporter_proxy') def __str__(self): return self.headline |
