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:
15
tests/regressiontests/swappable_models/models.py
Normal file
15
tests/regressiontests/swappable_models/models.py
Normal 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)
|
||||
Reference in New Issue
Block a user