1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.5.x] Fixed #19806 -- Ensure that content types and permissions aren't created for swapped models.

Thanks to rizumu for the report.

Backport of c8985a8a73.
This commit is contained in:
Russell Keith-Magee
2012-11-24 13:43:20 +08:00
parent 158a0332bf
commit 3fd8458fb3
6 changed files with 101 additions and 23 deletions

View File

@@ -0,0 +1,15 @@
from django.db import models
class Article(models.Model):
title = models.CharField(max_length=100)
publication_date = models.DateField()
class Meta:
swappable = 'TEST_ARTICLE_MODEL'
class AlternateArticle(models.Model):
title = models.CharField(max_length=100)
publication_date = models.DateField()
byline = models.CharField(max_length=100)