django-dirtyfields icon indicating copy to clipboard operation
django-dirtyfields copied to clipboard

Tracking dirty fields on a Django model

Results 21 django-dirtyfields issues
Sort by recently updated
recently updated
newest added

**Describe the bug** When the model has one or more `django.db.models.fields.files.ImageFieldFile` fields and the `_as_dict` function is called an `{AttributeError} 'NoneType' object has no attribute 'seek'` is raised when the...

Bug

**Describe the bug** A regression done in https://github.com/FactoryBoy/factory_boy/pull/799 causes a RecursionError in Django Dirty Fields. This is probably the right place to solve this issue instead of the factory_boy repo....

Bug

There have been two PRs (#152 and #194) suggesting some sort of change to the current behavior which is that: a) Fields with `auto_now=True` do not appear as dirty -...

# Description Currently the `django-dirtyfields` detects the fields which have been updated. This changes is for the fields which gets updated once we save the object. Fields such as `last_updated...

Feature

**Is your feature request related to a problem? Please describe.** I have a decimal field that is limited to 4 decimal places. Even if the persisted value will end up...

Feature

Use `_meta.get_fields()` to get list of fields, instead of `_meta.concrete_fields` which is a private API https://docs.djangoproject.com/en/2.2/ref/models/meta/#django.db.models.options.Options.get_fields

Be able to specify a set of fields to ignore.

Feature

Currently, if we do: ``` tm.field = 'new field value' tm.get_dirty_fields() #returns {'field': 'original field value'} try: with transaction.atomic(): tm.save() raise Exception #force a rollback except Exception: pass tm.get_dirty_fields() #returns...

Feature

Add an option to automatically include `DateTimeField` and `DateField` with `auto_now` set to `True` to a list of dirty fields in case any other field has changed.

Feature

Originally reported by @lestatcheb in #117 Test case that currently fails: ```python class DatetimeModelStandard(DirtyFieldsMixin, models.Model): datetime_field = models.DateTimeField(blank=True, null=True) @pytest.mark.django_db def test_dirty_fields_field_now(): tm = DatetimeModelStandard.objects.create() assert tm.get_dirty_fields() == {} tm.datetime_field...