From 26ba6c0a361d091fccd2750631d49491696cc13e Mon Sep 17 00:00:00 2001 From: baoliang Date: Sun, 25 Oct 2020 22:18:41 +0800 Subject: [PATCH] add message --- dashboard/models.py | 4 ++++ polls/views/__pycache__/news.cpython-38.pyc | Bin 1566 -> 1671 bytes polls/views/news.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dashboard/models.py b/dashboard/models.py index 1330ae4..a8d7683 100644 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -50,6 +50,7 @@ class Group(models.Model): village = models.CharField('村', max_length=256, null=True, blank=True) classify = models.CharField( '分类', max_length=256, null=True, blank=True, choices=GROUP_CLASSIFY_CHOICES) + rank = models.IntegerField('rank', default=0) user = models.ForeignKey( User, on_delete=models.CASCADE, blank=True, null=True) @@ -671,6 +672,9 @@ class News(models.Model): def __str__(self): return self.title + class Meta: + ordering = ["-date"] + # 手机验证码验证表 class CheckCode(models.Model): diff --git a/polls/views/__pycache__/news.cpython-38.pyc b/polls/views/__pycache__/news.cpython-38.pyc index b27823909612968e165ca8e90f66445a10e1fbfa..e08a792e7273b370f27db8d47ca03a6a2262d857 100644 GIT binary patch delta 268 zcmbQo)6UBq%FD~e00b80Q{ycr@_uGqHkpx8R%!uj3d=&qTBdY{TIL!i7lzo3T9y*F zW`vQdy8%#j2ZoO{63KmHMU0oyvBA7vhG>DJ^5pqCcvMrOO ibdfxWs{kT|K!hTQPy!JwlLJ_`uz|HmZRTPXVFUn;oIV=> delta 197 zcmZqYoyWr)%FD~e00dd=+3{)3I|Y<(}n>k!n=Skg=--rkk1X|GcVw; zVO_|`$WW+KB9OvU!<@o9hbe_Gg};|6m_bv(?-oaLVo7Rxeo^HuM#Ghiw^&Ll3nrgn rjAB|TI9Y{Bak4+t3r4=p7R