I'm using a property of type JSONField in my model:
from django.db import models
class MyClass(models.Model):
variables = models.JSONField()
I want to avoid as much as possible using strings to access variables properties, is there any way to specify the type of variables, so that I can use obj.variables.prop_name rather than obj.variables['prop_name']?