A Django field consisting of several fields

时间:2016-10-15 17:21:33

标签: django django-models field

I want a "composite" Django fields which corresponds to two (rather than one) database columns.

In fact the composite field should consist of two ForeignKey fields.

Otherwise it should behave like a normal field. For example it can be used in a form to input data.

It seems that Django 1.10.1 does not support this. I may try to write a patch. Any advice?

1 个答案:

答案 0 :(得分:0)

我已经(部分)在https://bitbucket.org/portonv/composite-fields

中实施了它