summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/models.py
diff options
context:
space:
mode:
authorMagnus Hagander2015-02-07 12:31:59 +0000
committerMagnus Hagander2015-02-07 12:31:59 +0000
commit2bf6b909fd42f09ada9667264b9a0300f15503d9 (patch)
tree57c43a29d428f04b685081fdfe8e25063a0d1c16 /pgcommitfest/commitfest/models.py
parentd251d24f6e0d94871334deb070643f2b47caa918 (diff)
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.
Diffstat (limited to 'pgcommitfest/commitfest/models.py')
-rw-r--r--pgcommitfest/commitfest/models.py9
1 files changed, 9 insertions, 0 deletions
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)