* needs_better_patch: 0 => 1
* easy: => 0
Comment:
10808b-14404.diff fails to apply cleanly on to trunk
--
Ticket URL: <http://code.djangoproject.com/ticket/10808#comment:16>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by lsaffre):
The following workaround uses the class_prepared signal to removes any
duplicate fields from `_meta._field_cache`:
{{{
def on_class_prepared(signal,sender=None,**kw):
cache = []
field_names = set()
for f,m in model._meta._field_cache:
if f.attname not in field_names:
field_names.add(f.attname)
cache.append( (f,m) )
model._meta._field_cache = tuple(cache)
model._meta._field_name_cache = [x for x, _ in cache]
models.signals.class_prepared.connect(on_class_prepared)
}}}
Works for me and has the advantage of not needing to patch Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/10808#comment:18>
Comment (by timgraham):
Closed #17232 as a duplicate.
--
Ticket URL: <https://code.djangoproject.com/ticket/10808#comment:19>
* status: new => closed
* resolution: => invalid
Comment:
Closing as invalid because the provided models don't validate:
{{{
PizzeriaBar: (models.E005) The field 'restaurant_ptr' from parent model
'polls.bar' clashes with the field 'restaurant_ptr' from parent model
'polls.pizzeria'.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/10808#comment:20>
* status: closed => new
* resolution: invalid =>
Comment:
I'm experiencing the bug with trying to inherit from wagtail's Page and
Collection models.
Closing the ticket about the models being invalid because provided models
were invalid doesn't look like a sound decision, so reopening.
--
Ticket URL: <https://code.djangoproject.com/ticket/10808#comment:21>
* status: new => closed
* resolution: => invalid
Comment:
Please don't reopen old tickets without providing new details. We cannot
accept or investigate reports based on model definitions that are not
supported.
--
Ticket URL: <https://code.djangoproject.com/ticket/10808#comment:22>