I am trying to define a model with one column being a mysql json type. Searching on web results in suggestions related to django's postgresql support for JSONField type or django-jsonfield.
Is there currently no way django natively supports mysql's json type. Also while doing inspectdb a column of type json in mysql was assigned the type TextField with a comment This field type is a guess.
How would I declare my model in such a way that it supports json fields?
UPDATE
As of Django 3.2, it now supports JSONField and django-mysql JSONField is now deprecated.
Check out django-mysql.
Django-MySQL supports the JSON data type and related functions through JSONField plus some JSON database functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With