smn/django-dirtyfields — pull request #10 by Xowap (2014-03-14 13:51:36+00:00)
Title: Copying Dirty Fields

The dirty fields mixin works fine for simple types like string, booleans or integers, however it fails when it comes to more complex objects like geometries or JSON fields.

Take the following model

```python
class Test(models.Model):
anchor = PointField()
```

Then do something like

```python
t = Test.objects.get(id=1)
t.anchor.x = 42
t.get_dirty_fields()
```

In the current version, this returns an empty array. However with the attached patch, it will indeed return "anchor" as a changed field, with the correct previous value.

Technical choices for this patch are explained in details in efd0286.

There is also a bit of PEP8 formatting in 6b4dcee.