Add missing field

fix_request_path_info^2
Iacopo Spalletti 2020-08-14 16:48:12 +02:00 committed by Chris Glass
parent 0950478fcd
commit 76efd54df5
2 changed files with 8 additions and 0 deletions

View File

@ -1450,6 +1450,13 @@ class Migration(migrations.Migration):
to="tests.ParentModelWithManager",
),
),
migrations.AddField(
model_name="childmodelwithmanager",
name="field1",
field=models.CharField(
max_length=10,
),
),
migrations.AddField(
model_name="childmodelwithmanager",
name="polymorphic_ctype",

View File

@ -222,6 +222,7 @@ class ParentModelWithManager(PolymorphicModel):
class ChildModelWithManager(PolymorphicModel):
# Also test whether foreign keys receive the manager:
field1 = models.CharField(max_length=10) # needed as MyManager uses it
fk = models.ForeignKey(
ParentModelWithManager, on_delete=models.CASCADE, related_name="childmodel_set"
)