Open AntoninoBonanno opened 2 years ago
hi any updates on this? how was this solved? I also have similar issue eg: role = [10, 20]
is there any solution? I also have similar issue!
I have to migrate to plain mongo to djongo mongo,, how to handle list[str] object :')
If there's no dedicated solution what is the workaround?
roles = JSONField(null=True, blank=True, default=[])
That worked for me, after migrating, of course
How is it possible to save an attribute of type
Array<string>
in the database?Example, i need store this object
I have not found any documentation about it.
NOTE: First time with django and djongo
Python script
models.py
I try with
roles = models.JSONField()
without success, if I remove theroles
attribute from the module the save is successfulserializers.py
views.py
Traceback
Env
With conda
With Pip