ためArrayFieldかのManyToManyFieldを使用すべき:は、私はジャンゴでPostgresのDBのモデルにタグを追加しようとしていますし、私は2つの解決策を見つけたタグ
from django.contrib.postgres.fields import ArrayField
class Post(models.Model):
tags = ArrayField(models.CharField(max_length=140))
...
私のコードで他のデータベースバックエンドをサポートすることを気にしないと仮定した場合、推奨される解決策は何ですか?
ホイールを再開発したくない場合 - https://django-taggit.readthedocs.io/en/latest/ – rayy
@rayy私の質問は、私が気づいている外部モジュールの使用に関するものではありません。実装の選択の詳細については、別のフィールドタイプの長所や短所についてもっと知りたかった – aliva
ArrayField内の[Django JSONField]の複製が可能です(https://stackoverflow.com/questions/41134260/django-jsonfield-inside- arrayfield) – e4c5