From 290a2021ce7f05bbc3ea4f2d495be91dbee6e05f Mon Sep 17 00:00:00 2001 From: baoliang Date: Wed, 30 Sep 2020 16:02:29 +0800 Subject: [PATCH] add reject value --- dashboard/models.py | 7 ++++++- polls/models.py | 7 +++++-- polls/views/__pycache__/media.cpython-38.pyc | Bin 4693 -> 4693 bytes polls/views/__pycache__/notice.cpython-38.pyc | Bin 2434 -> 2822 bytes polls/views/notice.py | 19 ++++++++++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dashboard/models.py b/dashboard/models.py index 6e98ecc..d64ed18 100644 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -119,7 +119,6 @@ class Organization(models.Model): class Meta: ordering = ["name"] - def __str__(self): return self.name @@ -143,6 +142,12 @@ class Userprofile(models.Model): class Meta: ordering = ["-created"] + def is_level1(self): + return self.organization.level.level == 1 + + def is_level2(self): + return self.organization.level.level == 2 + def __str__(self): return self.user.username+":"+self.name diff --git a/polls/models.py b/polls/models.py index 9b24c59..b2144d4 100644 --- a/polls/models.py +++ b/polls/models.py @@ -50,8 +50,11 @@ class Notice(models.Model): field = models.CharField('field', max_length=256, null=True, blank=True) record_id = models.CharField( 'record_id', max_length=256, null=True, blank=True) - record_value = models.CharField( - 'record_value', max_length=256, null=True, blank=True) + record_pass_value = models.CharField( + 'record_pass_value', max_length=256, null=True, blank=True) + record_reject_value = models.CharField( + 'record_reject_value', max_length=256, null=True, blank=True) + is_read = models.BooleanField('是否阅读', default=False) added = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) diff --git a/polls/views/__pycache__/media.cpython-38.pyc b/polls/views/__pycache__/media.cpython-38.pyc index 31447ac42bb8eff7c550e93611f6837db6859767..65f6d537b4f00caf1d99146d41543d6385bdeaad 100644 GIT binary patch delta 20 acmcbra#e*pl$V!_0SH9IN;YzP2>}2zBLpn~ delta 20 acmcbra#e*pl$V!_0SI_}ayD{%2>}2!2Lw|9 diff --git a/polls/views/__pycache__/notice.cpython-38.pyc b/polls/views/__pycache__/notice.cpython-38.pyc index f99fc07103e75f73f8b1619e0d122dc55a378ea1..2f9b6bcedb84a425ee3562bfa1f556101693c0ad 100644 GIT binary patch delta 419 zcmXZX%}N6?5C`zgZZ_TBc1vq*E!N^e{8+42D?RC9#k-eQ#9oS+9$LR3%}KTh-6CET z%3eJvK7r^X_z0dn_yWF!Gm8oH%bzeI$+&P=${u;1%WypI>TcPaW*6XNy8c?~iC$Xf z<;;Xd5J6{FS}o=m-o7T*yg}{%gX3yr9bgUb;~!q>Je!igzz9MZHZ+%(6f*T>M9^Y4 zb!`pAzzjj!4=^%xDqcl2dBDRPeQAB)KRVbST{Z?%g^ms+DS5;z>NX|Hze6E&gV~0qtSf&)LkqJJg zZ%_90Y5$^ob*=kny?xvomJw#U;6esCWWm4^;F>vHRr9?qegWEXV6Tb*8~tK@X@80) TMis;jX9a5UiQ|h*-oTT8$9hKk delta 72 zcmZn@YZB%Q<>lpK00M*AdGQCiCi2NJE}5vkm@S1hm_bu;