diff --git a/management/views.py b/management/views.py
index bb081e3..957d8ac 100644
--- a/management/views.py
+++ b/management/views.py
@@ -65,7 +65,7 @@ def user_delete(request, pk):
def user_update(request, pk):
user = User.objects.get(id=pk)
userprofile = Userprofile.objects.get(user_id=user.id)
- organization = Organization.objects.all()
+ organization = Organization.objects.filter(status='1')
if request.method == 'POST':
organization_id = request.POST.get('organization')
name = request.POST.get('name')
@@ -197,6 +197,10 @@ def group_update(request, pk):
group_status_choices_list = []
for g in range(2):
group_status_choices_list.append(g)
+ GROUP_CLASSIFY_CHOICES = Group.GROUP_CLASSIFY_CHOICES
+ g_c_c_res = []
+ for g_c_c in GROUP_CLASSIFY_CHOICES:
+ g_c_c_res.append(list(g_c_c)[1])
group_type = Group_type.objects.all()
group_admin = Group_admin.objects.filter(group_id=pk)
print(pk)
@@ -230,6 +234,7 @@ def group_update(request, pk):
type = request.POST.get('type')
status = request.POST.get('status')
province = request.POST.get('province')
+ classify = request.POST.get('classify')
print(str(province) + "66666666666666666666666666")
if province != '' and province.isdigit():
province_r = Area_code_2020.objects.get(code=province).name
@@ -258,7 +263,7 @@ def group_update(request, pk):
if image is not None:
Group.objects.filter(id=pk).update(name=name, presentation=presentation, type_id=type, status=status,
province=province_r, cities=city_r, district=district_r, town=town_r,
- village=village_r)
+ village=village_r,classify=classify)
g = Group.objects.get(id=pk)
g.image = image
g.save()
@@ -267,12 +272,12 @@ def group_update(request, pk):
else:
Group.objects.filter(id=pk).update(name=name, presentation=presentation, type_id=type, status=status,
province=province_r, cities=city_r, district=district_r, town=town_r,
- village=village_r)
+ village=village_r,classify=classify)
messages.success(request, '修改成功')
return HttpResponseRedirect('/management/group/management/init/')
return render(request, 'management/group-management-update.html',
{'group': group, 'group_status_choices_list': group_status_choices_list, 'group_type': group_type,
- 'g_a_list': g_a_list, 'g_u_list': g_u_list})
+ 'g_a_list': g_a_list, 'g_u_list': g_u_list,'g_c_c_res':g_c_c_res})
def group_create(request):
@@ -281,6 +286,10 @@ def group_create(request):
for g in range(2):
group_status_choices_list.append(g)
group_type = Group_type.objects.all()
+ GROUP_CLASSIFY_CHOICES = Group.GROUP_CLASSIFY_CHOICES
+ g_c_c_res = []
+ for g_c_c in GROUP_CLASSIFY_CHOICES:
+ g_c_c_res.append(list(g_c_c)[1])
if request.method == 'POST':
name = request.POST.get('name')
presentation = request.POST.get('presentation')
@@ -288,6 +297,7 @@ def group_create(request):
type = request.POST.get('type')
status = request.POST.get('status')
province = request.POST.get('province')
+ classify = request.POST.get('classify')
if province != '':
province_r = Area_code_2020.objects.get(code=province).name
else:
@@ -316,7 +326,7 @@ def group_create(request):
print(name, presentation, image, type, status, province, city, district, town, village)
if name is not None:
group = Group(name=name, presentation=presentation, image=image, type_id=type, status=status,
- province=province_r, cities=city_r, district=district_r, town=town_r, village=village_r,user_id=user.id)
+ province=province_r, cities=city_r, district=district_r, town=town_r, village=village_r,user_id=user.id,classify=classify)
group.save()
messages.success(request, '添加成功')
return render(request,'management/add-group-admin-and-user.html',{'group':group})
@@ -324,7 +334,7 @@ def group_create(request):
messages.error(request, '矩阵名不能为空')
# return HttpResponseRedirect('/management/group/management/')
return render(request, 'management/group-management-create.html',
- {'group_status_choices_list': group_status_choices_list, 'group_type': group_type})
+ {'group_status_choices_list': group_status_choices_list, 'group_type': group_type,'g_c_c_res':g_c_c_res})
def group_admin_create(request, pk):
@@ -525,7 +535,7 @@ def organization_create(request):
if name is not None:
organization = Organization(name=name, image=image, organizationtype_id=organizationtype,
province=province, cities=city, district=district, town=town,
- village=village,level_id=level_id)
+ village=village,level_id=level_id,status='0')
organization.save()
messages.success(request, '添加成功')
else:
@@ -542,7 +552,7 @@ def newmedia_management_create_weixin(request):
weixin_status_choices_list = []
for w in range(2):
weixin_status_choices_list.append(w)
- organization = Organization.objects.all().order_by('-name')
+ organization = Organization.objects.filter(status='1').order_by('-name')
if request.method == 'POST':
code = request.POST.get('code')
weixinid = request.POST.get('weixinid')
@@ -580,7 +590,7 @@ def newmedia_management_create_weibo(request):
weibo_status_choices_list = []
for w in range(2):
weibo_status_choices_list.append(w)
- organization = Organization.objects.all().order_by('-name')
+ organization = Organization.objects.filter(status='1').order_by('-name')
if request.method == 'POST':
code = request.POST.get('code')
weiboid = request.POST.get('weiboid')
@@ -619,7 +629,7 @@ def newmedia_management_create_toutiao(request):
toutiao_status_choices_list = []
for w in range(2):
toutiao_status_choices_list.append(w)
- organization = Organization.objects.all().order_by('-name')
+ organization = Organization.objects.filter(status='1').order_by('-name')
if request.method == 'POST':
code = request.POST.get('code')
toutiaoid = request.POST.get('toutiaoid')
@@ -658,7 +668,7 @@ def newmedia_management_create_douyin(request):
for w in range(2):
douyin_status_choices_list.append(w)
print(douyin_status_choices_list)
- organization = Organization.objects.all().order_by('-name')
+ organization = Organization.objects.filter(status='1').order_by('-name')
if request.method == 'POST':
code = request.POST.get('code')
douyinid = request.POST.get('douyinid')
@@ -696,7 +706,7 @@ def newmedia_management_create_qita(request):
qita_status_choices_list = []
for w in range(2):
qita_status_choices_list.append(w)
- organization = Organization.objects.all().order_by('-name')
+ organization = Organization.objects.filter(status='1').order_by('-name')
if request.method == 'POST':
type = request.POST.get('type')
name = request.POST.get('name')
@@ -1045,7 +1055,7 @@ def newmedia_management_update_weixin(request, pk):
for w in range(2):
weixin_status_choices_list.append(w)
weixin = Weixin.objects.get(id=pk)
- organization = Organization.objects.all()
+ organization = Organization.objects.filter(status='1')
if request.method == 'POST':
code = request.POST.get('code')
weixinid = request.POST.get('weixinid')
@@ -1087,7 +1097,7 @@ def newmedia_management_update_weibo(request, pk):
for w in range(2):
weibo_status_choices_list.append(w)
weibo = Weibo.objects.get(id=pk)
- organization = Organization.objects.all()
+ organization = Organization.objects.filter(status='1')
if request.method == 'POST':
code = request.POST.get('code')
weiboid = request.POST.get('weiboid')
@@ -1129,7 +1139,7 @@ def newmedia_management_update_toutiao(request, pk):
for w in range(2):
toutiao_status_choices_list.append(w)
toutiao = Toutiao.objects.get(id=pk)
- organization = Organization.objects.all()
+ organization = Organization.objects.filter(status='1')
if request.method == 'POST':
code = request.POST.get('code')
toutiaoid = request.POST.get('toutiaoid')
@@ -1170,7 +1180,7 @@ def newmedia_management_update_douyin(request, pk):
for w in range(2):
douyin_status_choices_list.append(w)
douyin = Douyin.objects.get(id=pk)
- organization = Organization.objects.all()
+ organization = Organization.objects.filter(status='1')
if request.method == 'POST':
code = request.POST.get('code')
douyinid = request.POST.get('douyinid')
@@ -1209,7 +1219,7 @@ def newmedia_management_update_qita(request, pk):
qita_status_choices_list = []
for w in range(2):
qita_status_choices_list.append(w)
- organization = Organization.objects.all()
+ organization = Organization.objects.filter(status='1')
qita = Qita.objects.get(id=pk)
if request.method == 'POST':
type = request.POST.get('type')
diff --git a/monitor/templates/monitor/new-media-public-opinion-douyin.html b/monitor/templates/monitor/new-media-public-opinion-douyin.html
new file mode 100644
index 0000000..e8b90c6
--- /dev/null
+++ b/monitor/templates/monitor/new-media-public-opinion-douyin.html
@@ -0,0 +1,110 @@
+{% extends 'dashboard/base/base.html' %}
+{% load static %}
+{% block content %}
+
+
+
+
+
+
+
+
+
+ {% if messages %}
+
+
+ {% for message in messages %}
+ {{ message }}.
+ {% endfor %}
+
+ {% endif %}
+
+
+
+
+
+
+
+
抖音热点
+
+
+
+ 公众号
+
+
+
+ 分组
+
+
+
+
+
+
+
+
+
+
+
+ 抖音号 |
+ 封面 |
+ 总发文量 |
+ 监测时间内发文量 |
+ 评论数 |
+ 作者回复数 |
+ 最近发文日期 |
+
+
+
+ {% for r in res %}
+
+ {{ r.code }} |
+ |
+ {{ r.count }} |
+ {{ r.count_jc }} |
+ {{ r.comment }} |
+ {{ r.reply }} |
+ {{ r.date }} |
+
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
diff --git a/monitor/templates/monitor/new-media-public-opinion-qita.html b/monitor/templates/monitor/new-media-public-opinion-qita.html
index 0d14af2..a46dda0 100644
--- a/monitor/templates/monitor/new-media-public-opinion-qita.html
+++ b/monitor/templates/monitor/new-media-public-opinion-qita.html
@@ -34,6 +34,7 @@
头条
微博
+
抖音
其他
diff --git a/monitor/templates/monitor/new-media-public-opinion-toutiao.html b/monitor/templates/monitor/new-media-public-opinion-toutiao.html
index 8ec5272..3066aad 100644
--- a/monitor/templates/monitor/new-media-public-opinion-toutiao.html
+++ b/monitor/templates/monitor/new-media-public-opinion-toutiao.html
@@ -32,6 +32,7 @@
微信
头条
微博
+
抖音
其他
diff --git a/monitor/templates/monitor/new-media-public-opinion-weibo.html b/monitor/templates/monitor/new-media-public-opinion-weibo.html
index f12048a..32ee65e 100644
--- a/monitor/templates/monitor/new-media-public-opinion-weibo.html
+++ b/monitor/templates/monitor/new-media-public-opinion-weibo.html
@@ -32,6 +32,7 @@