![]() |
1
4
默认情况下,它设置一个逗号分隔的整数列表字段。
|
![]() |
2
9
CommaSeparatedIntegerField
立刻想到。其实施方式为
|
![]() |
3
6
见 this answer 有关commaseparatedintegerfield的可能替代版本的描述,它将为您做更多的工作(从列表转换为字符串并返回)。也许你可以和那个人联系一下,看看他是否已经写过了——) |
![]() |
4
3
如果您使用的是PostgreSQL,那么就可以本机存储数组类型。 例如,请参见: https://github.com/aino/django-arrayfields 和 https://github.com/ecometrica/django-dbarray |
![]() |
5
0
我用的是arrayfield: https://docs.djangoproject.com/en/2.1/ref/contrib/postgres/fields/#querying-arrayfield 如。
用法:
|