Open sgordon16 opened 1 month ago
I guess we probably can since django 3.1 was the first version to include universal JSON support on all supported db backends. Before that, we couldn't. Open to creating a PR?
PR #299
Side question. Is there a reason why object_json_repr
is stored in a list?
It's a bit un-intuitive to have to add the 0 to query the json. CRUDEvent.objects.filter(object_json_repr__0__model="app.model")
https://github.com/soynatan/django-easy-audit/blob/70e192ba7cb527c0b4bc1c02022ea045fd2829eb/easyaudit/signals/model_signals.py#L90
Is there any reason why we can't use
JSONField
instead ofTextField
forobject_json_repr
? It would allow for querying within the json for specific logs.https://docs.djangoproject.com/en/5.0/ref/models/fields/#jsonfield