Skip to content

Commit

Permalink
feat: use json fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sgordon16 committed Jul 24, 2024
1 parent 70e192b commit abc4183
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.11 on 2024-07-24 21:18

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('easyaudit', '0004_auto_20170620_1354_squashed_0019_alter_crudevent_changed_fields_and_more'),
]

operations = [
migrations.AlterField(
model_name='crudevent',
name='changed_fields',
field=models.JSONField(blank=True, default=dict, verbose_name='Changed fields'),
),
migrations.AlterField(
model_name='crudevent',
name='object_json_repr',
field=models.JSONField(blank=True, default=dict, verbose_name='Object JSON representation'),
),
]
8 changes: 4 additions & 4 deletions easyaudit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class CRUDEvent(models.Model):
object_repr = models.TextField(
default="", blank=True, verbose_name=_("Object representation")
)
object_json_repr = models.TextField(
default="", blank=True, verbose_name=_("Object JSON representation")
object_json_repr = models.JSONField(
default=dict, blank=True, verbose_name=_("Object JSON representation")
)
changed_fields = models.TextField(
default="", blank=True, verbose_name=_("Changed fields")
changed_fields = models.JSONField(
default=dict, blank=True, verbose_name=_("Changed fields")
)
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
Expand Down

0 comments on commit abc4183

Please sign in to comment.