Is there a way to inherit from an existing model in order to copy of all its fields (in a DRY manner) without invoking multitable inheritance if the model isn't abstract
?
To be clear, I have a model Post
, and I'd like to have another model GhostPost
that mirrors Post
exactly in terms of the available fields, but I do not want it to have multitable inheritance or any kind of relationship with Post
. The problem is, Post
isn't an abstract model, so Django will initiate multitable inheritance. Is there a way around this?
Update: What I'm looking for here is not a Python-level duplicate of the model, but an actual separate database table that mirrors those fields.
Solution: I followed @Brandon's advice and used an abstract model.