Closed GoogleCodeExporter closed 9 years ago
This problem comes from _meta. Field names are assigned to _meta on registered
model. It will require to have
those assigned to Meta (class) also, but actually there isn't any way how to
assign something to Meta - because
of the Options checker - this should be changed in django itself. There should
be support for user defined meta
attributes.
When the proxy gets created, it mixes up _meta for it based on origin Meta, so
specific fields are not in proxy
anymore. The same problem happens with model inheritance.
Original comment by pcicman@gmail.com
on 22 Jul 2009 at 10:33
Fixing this would require some level of deep magic. As pcicman points out,
merely adding the fields to the model is the easy part. We need to add things
to the _meta as well.
One option is to add a metaclass to the model which automatically registers
model subclasses. Enough magic to make me uncomfortable, but maybe someone can
improve on that.
Original comment by craig.ds@gmail.com
on 2 Sep 2010 at 12:38
This can be considered fixed in the abstract-model-refactor branch, since that
uses abstract models, and fields inherit nicely.
Closing, any further discussion should go to Issue 34
Original comment by craig.ds@gmail.com
on 20 Sep 2010 at 10:28
Original issue reported on code.google.com by
dotsph...@gmail.com
on 2 Jul 2009 at 6:43