From 8d92b9e3addeb436860fa4ecfeaa9d4a3f770b26 Mon Sep 17 00:00:00 2001 From: baoliang Date: Sun, 28 Mar 2021 22:41:15 +0800 Subject: [PATCH] add meida type --- dashboard/models.py | 80 ++++++++++++------- polls/views/__pycache__/media.cpython-38.pyc | Bin 7939 -> 8077 bytes polls/views/__pycache__/user.cpython-38.pyc | Bin 7211 -> 7308 bytes polls/views/media.py | 6 ++ polls/views/user.py | 1 + 5 files changed, 57 insertions(+), 30 deletions(-) diff --git a/dashboard/models.py b/dashboard/models.py index 9e0ec99..987207e 100644 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -114,6 +114,8 @@ class Organizationtype(models.Model): return self.organizationtype # 单位 + + class Organization(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) name = models.CharField('单位名', max_length=256, null=True, blank=True) @@ -375,6 +377,7 @@ class NewMedia(models.Model): result['alias'] = o.alias result['status'] = o.status result['type'] = 'weixin' + result['subtype'] = '' results.append(result) for o in weibo: result = dict() @@ -383,6 +386,7 @@ class NewMedia(models.Model): result['alias'] = o.alias result['status'] = o.status result['type'] = 'weibo' + result['subtype'] = '' results.append(result) for o in toutiao: result = dict() @@ -391,6 +395,7 @@ class NewMedia(models.Model): result['alias'] = o.alias result['status'] = o.status result['type'] = 'toutiao' + result['subtype'] = '' results.append(result) for o in douyin: result = dict() @@ -399,6 +404,7 @@ class NewMedia(models.Model): result['alias'] = o.alias result['status'] = o.status result['type'] = 'douyin' + result['subtype'] = '' results.append(result) for o in qita: result = dict() @@ -407,6 +413,7 @@ class NewMedia(models.Model): result['alias'] = o.alias result['status'] = o.status result['type'] = 'qita' + result['subtype'] = o.type results.append(result) return results @@ -424,12 +431,13 @@ class Weixin_data(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) weixin = models.ForeignKey( Weixin, on_delete=models.CASCADE, null=True, blank=True) - mp = models.CharField('mp',max_length=256,null=True,blank=True) - title = models.CharField('标题',max_length=256,null=True,blank=True) - content = models.TextField('content',null=True,blank=True) - author = models.CharField('author',max_length=256,null=True,blank=True) - timestamp = models.CharField('timestamp',max_length=256,null=True,blank=True) - link = models.CharField('link',max_length=2560,null=True,blank=True) + mp = models.CharField('mp', max_length=256, null=True, blank=True) + title = models.CharField('标题', max_length=256, null=True, blank=True) + content = models.TextField('content', null=True, blank=True) + author = models.CharField('author', max_length=256, null=True, blank=True) + timestamp = models.CharField( + 'timestamp', max_length=256, null=True, blank=True) + link = models.CharField('link', max_length=2560, null=True, blank=True) created = models.DateTimeField('创建时间', auto_now_add=True) updated = models.DateTimeField('更新时间', auto_now=True) @@ -526,9 +534,10 @@ class Toutiao_data(models.Model): toutiao = models.ForeignKey( Toutiao, on_delete=models.CASCADE, null=True, blank=True) tid = models.CharField('tid', max_length=256, null=True, blank=True) - celltype = models.CharField('celltype', max_length=256, null=True, blank=True) + celltype = models.CharField( + 'celltype', max_length=256, null=True, blank=True) title = models.CharField('标题', max_length=256, null=True, blank=True) - content = models.TextField('内容',null=True,blank=True) + content = models.TextField('内容', null=True, blank=True) time = models.CharField('时间', max_length=256, null=True, blank=True) url = models.CharField('链接', max_length=256, null=True, blank=True) commentcount = models.IntegerField('评论量', null=True, blank=True) @@ -552,15 +561,16 @@ class Toutiao_comment(models.Model): # toutiao = models.ForeignKey( # Toutiao, on_delete=models.CASCADE, null=True, blank=True) - type = models.CharField('type',max_length=256,null=True,blank=True) - tid = models.CharField('tid',max_length=256,null=True,blank=True) - cid = models.CharField('cid',max_length=256,null=True,blank=True) - rid = models.CharField('rid',max_length=256,null=True,blank=True) - username = models.CharField('username',max_length=256,null=True,blank=True) - content = models.TextField('content',null=True,blank=True) - time = models.CharField('time',max_length=256,null=True,blank=True) - reply_count = models.IntegerField('reply_count',null=True,blank=True) - diggcount = models.IntegerField('diggcount',null=True,blank=True) + type = models.CharField('type', max_length=256, null=True, blank=True) + tid = models.CharField('tid', max_length=256, null=True, blank=True) + cid = models.CharField('cid', max_length=256, null=True, blank=True) + rid = models.CharField('rid', max_length=256, null=True, blank=True) + username = models.CharField( + 'username', max_length=256, null=True, blank=True) + content = models.TextField('content', null=True, blank=True) + time = models.CharField('time', max_length=256, null=True, blank=True) + reply_count = models.IntegerField('reply_count', null=True, blank=True) + diggcount = models.IntegerField('diggcount', null=True, blank=True) created = models.DateTimeField('创建时间', auto_now_add=True) updated = models.DateTimeField('更新时间', auto_now=True) @@ -741,7 +751,8 @@ class TimelinessMonitoring(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) n_type = models.CharField('新媒体类型', max_length=256, null=True, blank=True) # name = models.ForeignKey(NewMedia,on_delete=models.CASCADE) - identificationcode = models.CharField('新媒体标识码', max_length=256, null=True, blank=True) + identificationcode = models.CharField( + '新媒体标识码', max_length=256, null=True, blank=True) results = models.CharField('监测结果', max_length=256, null=True, blank=True) update = models.IntegerField('更新次数', null=True, blank=True) silent = models.IntegerField('静默日数', null=True, blank=True) @@ -772,30 +783,39 @@ class Wrongly(models.Model): def __str__(self): return self.title -#评论临时表 +# 评论临时表 + + class Comment(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) comment = models.TextField('评论', null=True, blank=True) user = models.CharField('用户', max_length=256, null=True, blank=True) reply = models.TextField('回复', null=True, blank=True) - name = models.CharField('新媒体名称',max_length=256, null=True, blank=True) - title = models.CharField('标题',max_length=256, null=True, blank=True) - date = models.CharField('时间',max_length=256, null=True, blank=True) - url = models.CharField('文章链接',max_length=256, null=True, blank=True) + name = models.CharField('新媒体名称', max_length=256, null=True, blank=True) + title = models.CharField('标题', max_length=256, null=True, blank=True) + date = models.CharField('时间', max_length=256, null=True, blank=True) + url = models.CharField('文章链接', max_length=256, null=True, blank=True) created = models.DateTimeField('创建时间', auto_now_add=True) updated = models.DateTimeField('更新时间', auto_now=True) def __str__(self): return self.user -#新媒体更新表(国办) +# 新媒体更新表(国办) + + class Newmediaupdate(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) - organization_name = models.CharField('单位全称',max_length=256,null=True,blank=True) - organization_id_code = models.CharField('单位唯一标识码',max_length=256,null=True,blank=True) - identificationcode = models.CharField('新媒体标识码',max_length=256,null=True,blank=True) - newmedia_name = models.CharField('账号名称',max_length=256,null=True,blank=True) - newmedia_type = models.CharField('账号类型',max_length=256,null=True,blank=True) + organization_name = models.CharField( + '单位全称', max_length=256, null=True, blank=True) + organization_id_code = models.CharField( + '单位唯一标识码', max_length=256, null=True, blank=True) + identificationcode = models.CharField( + '新媒体标识码', max_length=256, null=True, blank=True) + newmedia_name = models.CharField( + '账号名称', max_length=256, null=True, blank=True) + newmedia_type = models.CharField( + '账号类型', max_length=256, null=True, blank=True) function = models.CharField('功能', max_length=256, null=True, blank=True) province = models.CharField('省', max_length=256, null=True, blank=True) cities = models.CharField('市', max_length=256, null=True, blank=True) @@ -806,4 +826,4 @@ class Newmediaupdate(models.Model): updated = models.DateTimeField('更新时间', auto_now=True) def __str__(self): - return self.newmedia_name \ No newline at end of file + return self.newmedia_name diff --git a/polls/views/__pycache__/media.cpython-38.pyc b/polls/views/__pycache__/media.cpython-38.pyc index 1441cae52ccec09cacf77a09a845268d24fb47ea..e87415478851b8f1da075103a3ca957b10f11898 100644 GIT binary patch delta 671 zcmZ{h&uSA<6vofF^RLZhCYedojLAeTs8G7mE<`XI8^lEx-H02Z5ae3n3PQ&bTujI! zE~GGSF1pZ4n&7%vrfYoxU%-tEu@OOh2G86Cm4Y+yo!@--yJu$Z8D3A@&K<`o09}hO zd%Z7*&cJ5CvKRJeTsxZ>yxxMu6crH=H;65&VGClNH;Jr0HpJVodRmUEbvbdKT>MKpJ7AZD|O_gbbfmm0b&?JUrUhVLl#|(Q81w;jI$K`dZG(G(YV$E zo>!vJCO`*{KOB7fIF2@Q|LPw~OE1$41M_kSwOSBu%9&kX#O9o5zi46^T`&AiJD L85Y-+c60p=n8=&I delta 520 zcmZXRJ4-_`7>4uZ+-lpLTfH1>1w|0WNkI^;7eo*oT*O7KI7Eb~1#8Dtht5?ngNumz z52TyBfAke-@Vo{zcuZ!Uv6(RH7YO zt}^YRAF8sZEh{kZj<;!xO%9tI@nqcCH|xHj5wq<-m~a1p_RVfkGcUndyibfZS(~*i zO_GjzW5Rp}$!7fmLmR`5rlYvBG?%^e@|lII1TSRX3oF8$ zhd%8+60x%vRE)4|y2@7lFp=2+%+D-=1+X1k4MM|gvJ8td6WGd*n5lTxG~(NddrY0L0L*eJM?Mw*llzqK dE|j=KZ{4M2#-X@-HeBG*EGJII@r)ZOe*j;5ao+#{ diff --git a/polls/views/__pycache__/user.cpython-38.pyc b/polls/views/__pycache__/user.cpython-38.pyc index 1f9c5e56c3d51d69581fa4da96d4f4d121d0a79e..17250b33a659b636b108c5e9c0dcc0dd613a4a9d 100644 GIT binary patch delta 1959 zcmaJ?U2NM_6!vu-+p(LUrfHo1WUwFBW^310TUm<`+sei^_SaE{M%R&s+F9eaNpNqveGC1eGr^!H!0X4z=;-$LZ$o(>iLs(@hP1H1eL3<3J1@0f)}g=;pXcG@ zTp@zs3ASL832}+gS>R+@G{q7rk`3+yE^cti^q0h<&-KjR`4#X zc0JHAP{ob{ivW{h!x0eB0N3?+ZO4E`Ico&gz*!usp7Dfb1M+b@Q6hQK6d)Vp*(Sca z5xCEj)6Jf|+)@%ioMOhIX2TCxISBR`4=?kY+iE7vrbV#I6o!OU^U1O_cxve7vVVHK zkhf?IhE!IkCo^ugK&OV4Ox~o0oXLp%iKb0v95+2#xR7HX%g0EP-Iw2u?1BZf3!xjK zhh0*(9odbv9iS{ZnKvvd0Zr*NiQzT`Y*Q%+oN+9AqF`E+v;%@=WttYUxk;-`W@sn- zRq2jyg|KrRKoIK)zC$dgZe_h{LX(L~LSjUuM^=W^K07J=vzN}KqnJ(nvsE1i8+MovoRV$Q6r;IrG!+JoB(cOhGKfu6z^6$_9JB193;y0XHzhixi5Kq#d? zHsVLZ(JuN5F45s$$YtNegTJrG*c1UKCTdl2j;>6M<)0FKZNcaUyY3XdjxV9g9R zT%TK5eXn%y_Tu{d-Fv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