diff --git a/django/db/models/base.py b/django/db/models/base.py
index 05cd0d9..3a3fbf1 100644
a
|
b
|
class ModelBase(type):
|
116 | 116 | new_class._meta.local_many_to_many): |
117 | 117 | raise FieldError("Proxy model '%s' contains model fields." |
118 | 118 | % name) |
| 119 | while base._meta.proxy: |
| 120 | base = base._meta.proxy_for_model |
119 | 121 | new_class._meta.setup_proxy(base) |
120 | 122 | |
121 | 123 | # Do the appropriate setup for any model parents. |
… |
… |
class ModelBase(type):
|
123 | 125 | if isinstance(f, OneToOneField)]) |
124 | 126 | |
125 | 127 | for base in parents: |
| 128 | original_base = base |
126 | 129 | if not hasattr(base, '_meta'): |
127 | 130 | # Things without _meta aren't functional models, so they're |
128 | 131 | # uninteresting parents. |
… |
… |
class ModelBase(type):
|
167 | 170 | # Proxy models inherit the non-abstract managers from their base, |
168 | 171 | # unless they have redefined any of them. |
169 | 172 | if is_proxy: |
170 | | new_class.copy_managers(base._meta.concrete_managers) |
| 173 | new_class.copy_managers(original_base._meta.concrete_managers) |
171 | 174 | |
172 | 175 | # Inherit virtual fields (like GenericForeignKey) from the parent |
173 | 176 | # class |
diff --git a/tests/modeltests/proxy_models/models.py b/tests/modeltests/proxy_models/models.py
index ab38112..1c380e8 100644
a
|
b
|
FieldError: Proxy model 'NoNewFields' contains model fields.
|
178 | 178 | >>> ctype = ContentType.objects.get_for_model |
179 | 179 | >>> ctype(Person) is ctype(OtherPerson) |
180 | 180 | True |
181 | | """} |
182 | | |
183 | 181 | |
| 182 | >>> MyPersonProxy.objects.all() |
| 183 | [<MyPersonProxy: barney>, <MyPersonProxy: fred>] |
| 184 | """} |