From 1ca025f546cf6c0a077ec9e0cbe53cbca3687c11 Mon Sep 17 00:00:00 2001 From: xieshen <1397910458@qq.com> Date: Thu, 29 Oct 2020 15:19:15 +0800 Subject: [PATCH] #add message --- .../wrongly-management-paginate.html | 18 ++ monitor/static/monitor/image/dingwei.png | Bin 0 -> 8429 bytes .../templates/monitor/error-monitoring.html | 43 +++- .../monitor/sensitive-word-monitoring.html | 27 ++- .../monitor/timeliness-monitoring-douyin.html | 134 ++++++------ .../monitor/timeliness-monitoring-qita.html | 131 +++++------ .../timeliness-monitoring-toutiao.html | 131 +++++------ .../monitor/timeliness-monitoring-weibo.html | 131 +++++------ .../monitor/timeliness-monitoring-weixin.html | 129 +++++------ monitor/urls.py | 1 + monitor/views.py | 207 +++++++++++++++++- 11 files changed, 608 insertions(+), 344 deletions(-) create mode 100644 dashboard/templates/dashboard/paginator/wrongly-management-paginate.html create mode 100644 monitor/static/monitor/image/dingwei.png diff --git a/dashboard/templates/dashboard/paginator/wrongly-management-paginate.html b/dashboard/templates/dashboard/paginator/wrongly-management-paginate.html new file mode 100644 index 0000000..7c183b5 --- /dev/null +++ b/dashboard/templates/dashboard/paginator/wrongly-management-paginate.html @@ -0,0 +1,18 @@ +
+ +
diff --git a/monitor/static/monitor/image/dingwei.png b/monitor/static/monitor/image/dingwei.png new file mode 100644 index 0000000000000000000000000000000000000000..7ddde3382c299cecb6fe7b3a13b0167d3672ef59 GIT binary patch literal 8429 zcmb7qcTiKo_irfDn}8JQhz2PFVg#i3E+AFuqM{&8np_A~LY3ZYP>P^*1rb6}x*&wE zf&@??p@niG5K123@B8EZ{(1A}&F<_y_wHxr?4HlrbI+XF1oON4%nX+qAP@+%p@Ggl z2!skemv`u>&c}Q6OyLj+A~^o;Sp&Gzp;06dU$%aK_nd>9`5Yy zY;10AY;3HquKvO<&de|1cJ@{`wwBhn*4HnSm9@(l8S&$%1C3^x6tIxN7WNGgc0=0(62B3*v2+Vpw0T6U!WQ0QUf{H0dpxH zCXcS~f8P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EYwjSfEuD(|GPF(e5z#x%X3|&`*i6gcT)e23`{WK^^bIXW@Y^lgQGj_ zr}=Aqt{3pV`5e$pp>Y4cM-OOQ)frD>`9xlob3b$yL$Uqm(A)i&e+NU7?K$<84!R`w z^Jh!ZdC?_TrbI1N8Xt>GJcpk!a@vc^#F zME_jZtDG#t_ABJ%{(C}g5cm;lx;fOzWNL%$K=V##m+a3AcUJwWdL+8SyhQTr9Q3DV zZJEg3-8Of^Kl`9@+bwgon1ZSnzS_3{ zwt%7gLF~kb&bJbjT^Gg{k1o8#(-Qq;CF}T zU=^4B!j5CaLhKY?IsYwbqfn05^W`V2j`-9;{e(Msdg)jCs*X0JRN8wvG((q86kOxM zPak@Oy6Rgl-P`RHT(At`!RK!6r%KWY$7WAi9*;u{I#leO2kfg_y`ggV0JC2x4vzAO zHijP!JYQ-9q{AvZe+0X|(4gum_o2u*=xP7Bn)I3rpWZ3@++FTFoUS<$ytP=$rB5A4 z4E2ZOlM-IC;#5ODxdlX?avRT>J$>bNUG-tT&A?mzyu|+O-!fNDcZ$>^OjCS$@YNMc zUT(RJA+!F`V8lU&nl$cr70AmfCv~AFu$-_NQpN!11<`D+Hsh`8@twNZJZ!(O(Dl^s zwCQTxry&YGX!@B{Fuy~vfnuA>S|WEGKNE{|HA-cPz5UTa7Y|kH=syjzdY5%GMq%IU z)%^D?25(f3WyZ|`G^6^BQ>;M6Dy@s0IXv#RxC#6Z&i@y;nMZj_XV$&SfR>v}H&}d& zG75QyX)R}R7CLgyc9YYbbVjnyh~fUgMI~EOgpo{>OqBt7#~H61v@C{K&vtrbIimQu z3KZq@{~khOT?IvFZ!RtIU$g+y8^uurvQG@0(UAexPVN#{@Mmn_|9T9#mEMyiImo%*0bzZPwr7IQ4&feo+BpsC!qZPRk|we*tsj{RIF3 literal 0 HcmV?d00001 diff --git a/monitor/templates/monitor/error-monitoring.html b/monitor/templates/monitor/error-monitoring.html index c11adbd..5f0a99c 100644 --- a/monitor/templates/monitor/error-monitoring.html +++ b/monitor/templates/monitor/error-monitoring.html @@ -35,12 +35,14 @@ - + + + - + {# #} @@ -49,21 +51,31 @@ + {% for r in wrongly %} - - - - - - - - - - + + + + + + + {# #} + + + + + {% endfor %}
上下文序号 错别字 校正字上下文 网址 审核状态修改标记修改标记核实人 监测时间 定位
{{ r.code }}{{ r.title }}{{ r.comment }}{{ r.reply }}{{ r.date }}{{ r.date }}{{ r.date }}{{ r.date }}{{ r.date }}{{ r.date }}{{ forloop.counter }}{{ r.error }}{{ r.idea }}{{ r.site }}暂无数据已审核已修改管理员 {{ r.date }}截图 + 审核已修改
+ + @@ -74,3 +86,10 @@ {% endblock %} +{% block add_js %} + +{% endblock %} diff --git a/monitor/templates/monitor/sensitive-word-monitoring.html b/monitor/templates/monitor/sensitive-word-monitoring.html index a5c1b64..5c52220 100644 --- a/monitor/templates/monitor/sensitive-word-monitoring.html +++ b/monitor/templates/monitor/sensitive-word-monitoring.html @@ -39,19 +39,29 @@ 出现次数 定位 百分比 + 风险程度 + {% for r in data %} - {{ r.date }} - {{ r.date }} - {{ r.date }} - {{ r.date }} + 叙利亚 + 1 + 截图 + + %1 + + + + {% endfor %} - + + @@ -60,3 +70,10 @@ {% endblock %} +{% block add_js %} + +{% endblock %} diff --git a/monitor/templates/monitor/timeliness-monitoring-douyin.html b/monitor/templates/monitor/timeliness-monitoring-douyin.html index 306c8cd..9d12ed7 100644 --- a/monitor/templates/monitor/timeliness-monitoring-douyin.html +++ b/monitor/templates/monitor/timeliness-monitoring-douyin.html @@ -84,7 +84,8 @@ href="{% url 'monitor-timeliness-monitoring-toutiao' %}">头条
  • 微博
  • -
  • 其他
  • @@ -93,6 +94,7 @@ + @@ -107,6 +109,7 @@ {% for r in res %} + @@ -134,75 +137,74 @@ {% endblock %} diff --git a/monitor/templates/monitor/timeliness-monitoring-qita.html b/monitor/templates/monitor/timeliness-monitoring-qita.html index b992d5e..4ff1de4 100644 --- a/monitor/templates/monitor/timeliness-monitoring-qita.html +++ b/monitor/templates/monitor/timeliness-monitoring-qita.html @@ -93,6 +93,7 @@
    序号 抖音号 更新次数 最近更新时间
    {{ forloop.counter }} {{ r.n_name }} {{ r.count }} {{ r.start_data }}
    + @@ -108,6 +109,7 @@ {% for r in res %} + @@ -136,75 +138,74 @@ {% endblock %} diff --git a/monitor/templates/monitor/timeliness-monitoring-toutiao.html b/monitor/templates/monitor/timeliness-monitoring-toutiao.html index 38a468a..54803a2 100644 --- a/monitor/templates/monitor/timeliness-monitoring-toutiao.html +++ b/monitor/templates/monitor/timeliness-monitoring-toutiao.html @@ -93,6 +93,7 @@
    序号 新媒体类型 新媒体账号 更新次数
    {{ forloop.counter }} {{ r.n_type }} {{ r.n_name }} {{ r.count }}
    + @@ -107,6 +108,7 @@ {% for r in res %} + @@ -134,75 +136,74 @@ {% endblock %} diff --git a/monitor/templates/monitor/timeliness-monitoring-weibo.html b/monitor/templates/monitor/timeliness-monitoring-weibo.html index 6722ad1..411d06d 100644 --- a/monitor/templates/monitor/timeliness-monitoring-weibo.html +++ b/monitor/templates/monitor/timeliness-monitoring-weibo.html @@ -93,6 +93,7 @@
    序号 头条号 更新次数 最近更新时间
    {{ forloop.counter }} {{ r.n_name }} {{ r.count }} {{ r.start_data }}
    + @@ -107,6 +108,7 @@ {% for r in res %} + @@ -134,75 +136,74 @@ {% endblock %} diff --git a/monitor/templates/monitor/timeliness-monitoring-weixin.html b/monitor/templates/monitor/timeliness-monitoring-weixin.html index b6ac533..e3d8359 100644 --- a/monitor/templates/monitor/timeliness-monitoring-weixin.html +++ b/monitor/templates/monitor/timeliness-monitoring-weixin.html @@ -93,6 +93,7 @@
    序号 微博号 更新次数 最近更新时间
    {{ forloop.counter }} {{ r.n_name }} {{ r.count }} {{ r.start_data }}
    + @@ -107,6 +108,7 @@ {% for r in res %} + @@ -134,75 +136,78 @@ {% endblock %} diff --git a/monitor/urls.py b/monitor/urls.py index 4bb79fa..3ef78f3 100644 --- a/monitor/urls.py +++ b/monitor/urls.py @@ -10,6 +10,7 @@ urlpatterns = [ path('new/media/public/opinion/douyin/',views.new_media_public_opinion_douyin,name='monitor-new-media-public-opinion-douyin'), path('new/media/public/opinion/qita/',views.new_media_public_opinion_qita,name='monitor-new-media-public-opinion-qita'), #时效性监测 + path('timeliness/monitoring/json/',views.timeliness_monitoring_json,name='monitor-timeliness-monitoring-json'), path('timeliness/monitoring/weixin/',views.timeliness_monitoring_weixin,name='monitor-timeliness-monitoring-weixin'), path('timeliness/monitoring/weibo/',views.timeliness_monitoring_weibo,name='monitor-timeliness-monitoring-weibo'), path('timeliness/monitoring/toutiao/',views.timeliness_monitoring_toutiao,name='monitor-timeliness-monitoring-toutiao'), diff --git a/monitor/views.py b/monitor/views.py index 3d3aa8d..97aabd4 100644 --- a/monitor/views.py +++ b/monitor/views.py @@ -454,7 +454,8 @@ def timeliness_monitoring_qita(request): organization_count_month = Organization.objects.filter(created__range=(this_month_start, this_month_end)).count() organization_count_week = Organization.objects.filter(created__range=(this_week_start, this_week_end)).count() - timelinessmonitoring = TimelinessMonitoring.objects.exclude(n_type__in=['微信','微博','今日头条','抖音']).order_by('n_name') + timelinessmonitoring = TimelinessMonitoring.objects.exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).order_by( + 'n_name') res = [] if timelinessmonitoring is not None: @@ -496,11 +497,21 @@ def timeliness_monitoring_qita(request): def error_monitoring(request): - return render(request, 'monitor/error-monitoring.html') + wrongly = Wrongly.objects.all() + paginator = Paginator(wrongly, 8) + page = int(request.GET.get('page', 1)) + try: + wrongly = paginator.page(page) + except PageNotAnInteger: + wrongly = paginator.page(1) + except EmptyPage: + wrongly = paginator.page(paginator.num_pages) + return render(request, 'monitor/error-monitoring.html',{'wrongly':wrongly}) def sensitive_word_monitoring(request): - return render(request, 'monitor/sensitive-word-monitoring.html') + data = range(1,8) + return render(request, 'monitor/sensitive-word-monitoring.html',{'data':data}) def comment_on_interactive_monitoring(request): @@ -508,7 +519,7 @@ def comment_on_interactive_monitoring(request): def comment_on_interactive_monitoring_json(request): - data = Test.objects.all()[:500] + data = Test.objects.all()[:50] r = [] for d in data: content = d.content @@ -568,3 +579,191 @@ def test_json(request): return HttpResponse(json.dumps({ "res": res })) + + +def timeliness_monitoring_json(request): + timelinessmonitoring_lanzhou_weixin = \ + TimelinessMonitoring.objects.filter(city='兰州市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_lanzhou_weibo = \ + TimelinessMonitoring.objects.filter(city='兰州市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_lanzhou_toutiao = \ + TimelinessMonitoring.objects.filter(city='兰州市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_lanzhou_douyin = \ + TimelinessMonitoring.objects.filter(city='兰州市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_lanzhou_qita = \ + TimelinessMonitoring.objects.filter(city='兰州市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_jiayuguan_weixin = \ + TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiayuguan_weibo = \ + TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiayuguan_toutiao = \ + TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiayuguan_douyin = \ + TimelinessMonitoring.objects.filter(city__contains='嘉峪关', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiayuguan_qita = \ + TimelinessMonitoring.objects.filter(city__contains='嘉峪关').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_jinchang_weixin = \ + TimelinessMonitoring.objects.filter(city='金昌市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jinchang_weibo = \ + TimelinessMonitoring.objects.filter(city='金昌市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jinchang_toutiao = \ + TimelinessMonitoring.objects.filter(city='金昌市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jinchang_douyin = \ + TimelinessMonitoring.objects.filter(city='金昌市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jinchang_qita = \ + TimelinessMonitoring.objects.filter(city='金昌市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_jiuquan_weixin = \ + TimelinessMonitoring.objects.filter(city='酒泉市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiuquan_weibo = \ + TimelinessMonitoring.objects.filter(city='酒泉市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiuquan_toutiao = \ + TimelinessMonitoring.objects.filter(city='酒泉市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiuquan_douyin = \ + TimelinessMonitoring.objects.filter(city='酒泉市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_jiuquan_qita = \ + TimelinessMonitoring.objects.filter(city='酒泉市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_zhangye_weixin = \ + TimelinessMonitoring.objects.filter(city='张掖市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_zhangye_weibo = \ + TimelinessMonitoring.objects.filter(city='张掖市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_zhangye_toutiao = \ + TimelinessMonitoring.objects.filter(city='张掖市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_zhangye_douyin = \ + TimelinessMonitoring.objects.filter(city='张掖市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_zhangye_qita = \ + TimelinessMonitoring.objects.filter(city='张掖市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_wuwei_weixin = \ + TimelinessMonitoring.objects.filter(city='武威市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_wuwei_weibo = \ + TimelinessMonitoring.objects.filter(city='武威市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_wuwei_toutiao = \ + TimelinessMonitoring.objects.filter(city='武威市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_wuwei_douyin = \ + TimelinessMonitoring.objects.filter(city='武威市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_wuwei_qita = \ + TimelinessMonitoring.objects.filter(city='武威市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_baiyin_weixin = \ + TimelinessMonitoring.objects.filter(city='白银市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_baiyin_weibo = \ + TimelinessMonitoring.objects.filter(city='白银市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_baiyin_toutiao = \ + TimelinessMonitoring.objects.filter(city='白银市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_baiyin_douyin = \ + TimelinessMonitoring.objects.filter(city='白银市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_baiyin_qita = \ + TimelinessMonitoring.objects.filter(city='白银市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_tianshui_weixin = \ + TimelinessMonitoring.objects.filter(city='天水市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_tianshui_weibo = \ + TimelinessMonitoring.objects.filter(city='天水市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_tianshui_toutiao = \ + TimelinessMonitoring.objects.filter(city='天水市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_tianshui_douyin = \ + TimelinessMonitoring.objects.filter(city='天水市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_tianshui_qita = \ + TimelinessMonitoring.objects.filter(city='天水市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_pingliang_weixin = \ + TimelinessMonitoring.objects.filter(city='平凉市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_pingliang_weibo = \ + TimelinessMonitoring.objects.filter(city='平凉市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_pingliang_toutiao = \ + TimelinessMonitoring.objects.filter(city='平凉市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_pingliang_douyin = \ + TimelinessMonitoring.objects.filter(city='平凉市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_pingliang_qita = \ + TimelinessMonitoring.objects.filter(city='平凉市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_qingyang_weixin = \ + TimelinessMonitoring.objects.filter(city='庆阳市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_qingyang_weibo = \ + TimelinessMonitoring.objects.filter(city='庆阳市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_qingyang_toutiao = \ + TimelinessMonitoring.objects.filter(city='庆阳市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_qingyang_douyin = \ + TimelinessMonitoring.objects.filter(city='庆阳市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_qingyang_qita = \ + TimelinessMonitoring.objects.filter(city='庆阳市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_dingxi_weixin = \ + TimelinessMonitoring.objects.filter(city='定西市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_dingxi_weibo = \ + TimelinessMonitoring.objects.filter(city='定西市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_dingxi_toutiao = \ + TimelinessMonitoring.objects.filter(city='定西市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_dingxi_douyin = \ + TimelinessMonitoring.objects.filter(city='定西市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_dingxi_qita = \ + TimelinessMonitoring.objects.filter(city='定西市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_longnan_weixin = \ + TimelinessMonitoring.objects.filter(city='陇南市', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_longnan_weibo = \ + TimelinessMonitoring.objects.filter(city='陇南市', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_longnan_toutiao = \ + TimelinessMonitoring.objects.filter(city='陇南市', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_longnan_douyin = \ + TimelinessMonitoring.objects.filter(city='陇南市', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_longnan_qita = \ + TimelinessMonitoring.objects.filter(city='陇南市').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_gannan_weixin = \ + TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_gannan_weibo = \ + TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_gannan_toutiao = \ + TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_gannan_douyin = \ + TimelinessMonitoring.objects.filter(city__contains='甘南', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_gannan_qita = \ + TimelinessMonitoring.objects.filter(city__contains='甘南').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + + timelinessmonitoring_linxia_weixin = \ + TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='微信').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_linxia_weibo = \ + TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='微博').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_linxia_toutiao = \ + TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='今日头条').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_linxia_douyin = \ + TimelinessMonitoring.objects.filter(city__contains='临夏', n_type='抖音').aggregate(nums=Sum('update'))['nums'] + timelinessmonitoring_linxia_qita = \ + TimelinessMonitoring.objects.filter(city__contains='临夏').exclude(n_type__in=['微信', '微博', '今日头条', '抖音']).aggregate( + nums=Sum('update'))['nums'] + weixin = [timelinessmonitoring_lanzhou_weixin,timelinessmonitoring_jiayuguan_weixin,timelinessmonitoring_jinchang_weixin,timelinessmonitoring_jiuquan_weixin,timelinessmonitoring_zhangye_weixin,timelinessmonitoring_wuwei_weixin,timelinessmonitoring_baiyin_weixin,timelinessmonitoring_tianshui_weixin,timelinessmonitoring_pingliang_weixin,timelinessmonitoring_qingyang_weixin,timelinessmonitoring_dingxi_weixin,timelinessmonitoring_longnan_weixin,timelinessmonitoring_gannan_weixin,timelinessmonitoring_linxia_weixin] + weibo = [timelinessmonitoring_lanzhou_weibo,timelinessmonitoring_jiayuguan_weibo,timelinessmonitoring_jinchang_weibo,timelinessmonitoring_jiuquan_weibo,timelinessmonitoring_zhangye_weibo,timelinessmonitoring_wuwei_weibo,timelinessmonitoring_baiyin_weibo,timelinessmonitoring_tianshui_weibo,timelinessmonitoring_pingliang_weibo,timelinessmonitoring_qingyang_weibo,timelinessmonitoring_dingxi_weibo,timelinessmonitoring_longnan_weibo,timelinessmonitoring_gannan_weibo,timelinessmonitoring_linxia_weibo] + toutiao = [timelinessmonitoring_lanzhou_toutiao,timelinessmonitoring_jiayuguan_toutiao,timelinessmonitoring_jinchang_toutiao,timelinessmonitoring_jiuquan_toutiao,timelinessmonitoring_zhangye_toutiao,timelinessmonitoring_wuwei_toutiao,timelinessmonitoring_baiyin_toutiao,timelinessmonitoring_tianshui_toutiao,timelinessmonitoring_pingliang_toutiao,timelinessmonitoring_qingyang_toutiao,timelinessmonitoring_dingxi_toutiao,timelinessmonitoring_longnan_toutiao,timelinessmonitoring_gannan_toutiao,timelinessmonitoring_linxia_toutiao] + douyin = [timelinessmonitoring_lanzhou_douyin,timelinessmonitoring_jiayuguan_douyin,timelinessmonitoring_jinchang_douyin,timelinessmonitoring_jiuquan_douyin,timelinessmonitoring_zhangye_douyin,timelinessmonitoring_wuwei_douyin,timelinessmonitoring_baiyin_douyin,timelinessmonitoring_tianshui_douyin,timelinessmonitoring_pingliang_douyin,timelinessmonitoring_qingyang_douyin,timelinessmonitoring_dingxi_douyin,timelinessmonitoring_longnan_douyin,timelinessmonitoring_gannan_douyin,timelinessmonitoring_linxia_douyin] + qita = [timelinessmonitoring_lanzhou_qita,timelinessmonitoring_jiayuguan_qita,timelinessmonitoring_jinchang_qita,timelinessmonitoring_jiuquan_qita,timelinessmonitoring_zhangye_qita,timelinessmonitoring_wuwei_qita,timelinessmonitoring_baiyin_qita,timelinessmonitoring_tianshui_qita,timelinessmonitoring_pingliang_qita,timelinessmonitoring_qingyang_qita,timelinessmonitoring_dingxi_qita,timelinessmonitoring_longnan_qita,timelinessmonitoring_gannan_qita,timelinessmonitoring_linxia_qita] + print(weixin) + print(weibo) + print(toutiao) + print(douyin) + print(qita) + return HttpResponse(json.dumps({ + "status":"1", + "weixin":weixin, + "weibo":weibo, + "toutiao":toutiao, + "douyin":douyin, + "qita":qita + })) \ No newline at end of file
    序号 公众号 更新次数 最近更新时间
    {{ forloop.counter }} {{ r.n_name }} {{ r.count }} {{ r.start_data }}