Sunday, June 14, 2015

Re: How to DRY, define a set of model-fields and reuse them as multiple instances


On Jun 10, 2015, at 10:33 AM, ThomasTheDjangoFan <stefan.eichholz.berlin@googlemail.com> wrote:

Hi Bruno,

Abstract Base Models come close but they don't allow me to combine multiple instances of the BaseModel in the DataHolderModel.

My goal is to store them all in one table without having to manually add all the fields.

Any suggestions?

There's a django-compound-field package that seems to be what you want, but it hasn't been updated in five years, so it won't work with any recent version.  Still, it might be a place to start from.

Peter of the Norse



No comments:

Post a Comment