diff options
author | Magnus Hagander | 2013-08-18 17:12:11 +0000 |
---|---|---|
committer | Magnus Hagander | 2013-08-18 17:12:11 +0000 |
commit | fc14d745d311b43ac993af91a5914f545f2b27e5 (patch) | |
tree | 05c60158a7efbc656068ba24bb03b6de46e1b292 /pgcommitfest/commitfest/models.py | |
parent | 3fd84633c36e06958aef6f628c3e68422b973515 (diff) |
Create history entries for fields that are changed on a patch
Diffstat (limited to 'pgcommitfest/commitfest/models.py')
-rw-r--r-- | pgcommitfest/commitfest/models.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 2538e08..090804b 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -3,6 +3,8 @@ from django.contrib.admin.models import User from datetime import datetime +from util import DiffableModel + # We have few enough of these, and it's really the only thing we # need to extend from the user model, so just create a separate # class. @@ -52,7 +54,7 @@ class Topic(models.Model): return self.topic -class Patch(models.Model): +class Patch(models.Model, DiffableModel): name = models.CharField(max_length=500, blank=False, null=False, verbose_name='Description') topic = models.ForeignKey(Topic, blank=False, null=False) @@ -81,6 +83,10 @@ class Patch(models.Model): # that's attached to this message. lastmail = models.DateTimeField(blank=True, null=True) + map_manytomany_for_diff = { + 'authors': 'authors_string', + 'reviewers': 'reviewers_string', + } # Some accessors @property def authors_string(self): |