#add message
This commit is contained in:
parent
2815c4bba5
commit
34a548d85e
|
@ -1103,7 +1103,6 @@ def timeliness_monitoring_json_qita(request):
|
|||
@login_required
|
||||
def index_map(request):
|
||||
name = request.GET.get('name')
|
||||
print(name)
|
||||
timelinessmonitoring_weixin = \
|
||||
TimelinessMonitoring.objects.filter(city__contains=name, n_type='微信').aggregate(nums=Sum('update'))['nums']
|
||||
timelinessmonitoring_weibo = \
|
||||
|
@ -1126,16 +1125,13 @@ def index_map(request):
|
|||
|
||||
def index_newmedia_count(request):
|
||||
date_list = [x.strftime('%Y-%m-%d') for x in list(pd.date_range(start='2020-09-01',end=datetime.datetime.now()))]
|
||||
print(date_list)
|
||||
weixin_list = []
|
||||
weibo_list = []
|
||||
toutiao_list = []
|
||||
douyin_list = []
|
||||
qita_list = []
|
||||
for d in date_list:
|
||||
print(d)
|
||||
s = str(d).split('-')
|
||||
print(s[0],s[1],s[2])
|
||||
weixin = Weixin.objects.filter(created__year=s[0],created__month=s[1],created__day=s[2]).count()
|
||||
weixin_list.append(weixin)
|
||||
weibo = Weibo.objects.filter(created__year=s[0],created__month=s[1],created__day=s[2]).count()
|
||||
|
@ -1157,12 +1153,12 @@ def index_newmedia_count(request):
|
|||
}))
|
||||
|
||||
def index_warning_count(request):
|
||||
date_list = [x.strftime('%Y-%m-%d') for x in list(pd.date_range(start='2020-09-01',end=datetime.datetime.now()))]
|
||||
date_list = [x.strftime('%Y-%m-%d') for x in list(pd.date_range(start='2019-07-01',end=datetime.datetime.now()))]
|
||||
data = []
|
||||
for d in date_list:
|
||||
s = str(d).split('-')
|
||||
news = News.objects.filter(type='3',date=d).count()
|
||||
data.append(news)
|
||||
print(str(data)+"6666666666666666666666666666666")
|
||||
return HttpResponse(json.dumps({
|
||||
"status":"1",
|
||||
"data":data,
|
||||
|
|
Loading…
Reference in New Issue