#test
This commit is contained in:
parent
42c9f4ee9c
commit
accbbc42f1
|
@ -130,12 +130,12 @@ def create_user_profile(sender, instance, created, **kwargs):
|
|||
profile.user = instance
|
||||
profile.save()
|
||||
|
||||
NEWMEDIA_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
|
||||
class NewMedia(models.Model):
|
||||
NEWMEDIA_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('微信公众号', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
|
@ -319,6 +319,26 @@ class Toutiao_Wrong(models.Model):
|
|||
return self.wrong
|
||||
|
||||
|
||||
# 抖音
|
||||
class Douyin(NewMedia):
|
||||
douyinid = models.CharField('抖音ID', max_length=256, null=True, blank=True)
|
||||
|
||||
|
||||
# 抖音数据
|
||||
class Douyin_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
mewnedia = models.ForeignKey(Douyin, on_delete=models.CASCADE)
|
||||
count = models.CharField('总发文量', max_length=256, null=True, blank=True)
|
||||
count_jc = models.CharField(
|
||||
'监测时间内发文量', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
date = 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.mewnedia.code
|
||||
# 其他新媒体
|
||||
class Qita(NewMedia):
|
||||
type = models.CharField('新媒体类型', max_length=256, null=True, blank=True)
|
||||
|
@ -363,16 +383,18 @@ class News(models.Model):
|
|||
NEWMEDIA_NEWS_CHOICES = (
|
||||
('0', '政策依据'),
|
||||
('1', '基层动态'),
|
||||
('2', '通知'),
|
||||
('3', '外省动态'),
|
||||
('4', '监测通报'),
|
||||
('5', '舆情热点')
|
||||
('2', '外省动态'),
|
||||
('3', '监测通报'),
|
||||
('4', '舆情热点')
|
||||
)
|
||||
id = models.UUIDField('id',primary_key=True,default=uuid.uuid4)
|
||||
type = models.CharField('文章类型',max_length=256,null=True,blank=True,choices=NEWMEDIA_NEWS_CHOICES)
|
||||
title = models.CharField('文章标题',max_length=256,null=True,blank=True)
|
||||
image = models.FileField(
|
||||
upload_to='news/%Y/%m/%d/', null=True, blank=True)
|
||||
author = models.CharField('作者',max_length=256,null=True,blank=True)
|
||||
date = models.CharField('发表日期',null=True,blank=True,max_length=256)
|
||||
content = models.TextField('内容',null=True,blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
|
1824
management/views.py
1824
management/views.py
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue