'ArrayField consisting of composite field type
I have modeled composite field using https://pypi.org/project/django-composite-field/ in my django model (A URL field + a Boolean Field). What I want is to store a number of those (maybe in a list) in my base 'User' model. But ArrayField using django.contrib.postgres.fields only support a single data type. What I want is a list of the object (URL + boolean) for every user. Further I want to add validations for the number of objects eg.(min 2 objects, max 6 objects). What is a good way to model this?
Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
