From 2bf6b909fd42f09ada9667264b9a0300f15503d9 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 7 Feb 2015 13:31:59 +0100 Subject: Add status summary to top of each commitfest list Quick overview of how many patches are in each status, as exist on the old app. --- pgcommitfest/commitfest/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pgcommitfest/commitfest/models.py') diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index d60a1aa..f118bc2 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -137,6 +137,10 @@ class Patch(models.Model, DiffableModel): verbose_name_plural = 'patches' class PatchOnCommitFest(models.Model): + # NOTE! This is also matched by the commitfest_patchstatus table, + # but we hardcoded it in here simply for performance reasons since + # the data should be entirely static. (Yes, that's something we + # might re-evaluate in the future) STATUS_REVIEW=1 STATUS_AUTHOR=2 STATUS_COMMITTER=3 @@ -222,3 +226,8 @@ class MailThreadAttachment(models.Model): class Meta: ordering = ('-date',) unique_together = (('mailthread', 'messageid',), ) + +class PatchStatus(models.Model): + status = models.IntegerField(null=False, blank=False, primary_key=True) + statusstring = models.TextField(max_length=50, null=False, blank=False) + sortkey = models.IntegerField(null=False, blank=False, default=10) -- cgit v1.2.3