Django dynamic model fields

前端 未结 3 1597
一生所求
一生所求 2020-11-22 08:38

I\'m working on a multi-tenanted application in which some users can define their own data fields (via the admin) to collect additional data in forms and re

3条回答
  •  时光取名叫无心
    2020-11-22 09:08

    Further research reveals that this is a somewhat special case of Entity Attribute Value design pattern, which has been implemented for Django by a couple of packages.

    First, there's the original eav-django project, which is on PyPi.

    Second, there's a more recent fork of the first project, django-eav which is primarily a refactor to allow use of EAV with django's own models or models in third-party apps.

提交回复
热议问题