mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[2.0.x] Fixed #28750 -- Allowed models to define Meta.manager_inheritance_from_future for backwards compatibility.
Refs631f4ab061. Backport ofcbe334918afrom master
This commit is contained in:
committed by
Tim Graham
parent
542e6b0207
commit
2e6dd975a2
15
tests/model_meta/test_manager_inheritance_from_future.py
Normal file
15
tests/model_meta/test_manager_inheritance_from_future.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.db import models
|
||||
from django.test import SimpleTestCase
|
||||
from django.test.utils import isolate_apps
|
||||
|
||||
|
||||
@isolate_apps('model_meta')
|
||||
class TestManagerInheritanceFromFuture(SimpleTestCase):
|
||||
def test_defined(self):
|
||||
"""
|
||||
Meta.manager_inheritance_from_future can be defined for backwards
|
||||
compatibility with Django 1.11.
|
||||
"""
|
||||
class FuturisticModel(models.Model):
|
||||
class Meta:
|
||||
manager_inheritance_from_future = True # No error raised.
|
||||
Reference in New Issue
Block a user