From 1511e875b92484c72cff420b9463c802cde844ab Mon Sep 17 00:00:00 2001 From: baoliang Date: Tue, 13 Oct 2020 22:33:07 +0800 Subject: [PATCH] add message --- dashboard/urls.py | 3 ++- dashboard/views.py | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dashboard/urls.py b/dashboard/urls.py index e28ef7e..91ebc6f 100644 --- a/dashboard/urls.py +++ b/dashboard/urls.py @@ -21,6 +21,7 @@ urlpatterns = [ path('get/town/',views.get_town), path('get/village/',views.get_village), #单位搜索 - path('get/organization/',views.get_organization,name='get-organization') + path('get/organization/',views.get_organization,name='get-organization'), + path('tencent13722515905013783955.txt', views.wechat_verify, name='wechat-verify') ] diff --git a/dashboard/views.py b/dashboard/views.py index 02a764a..acb78c3 100644 --- a/dashboard/views.py +++ b/dashboard/views.py @@ -11,7 +11,7 @@ from django.contrib import messages from django.contrib.auth import logout, authenticate, login from django.contrib.auth.models import User from django.db.models import Q -from django.http import HttpResponseRedirect, JsonResponse, HttpResponse +from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import render import datetime @@ -19,6 +19,7 @@ import datetime from dashboard.models import Userprofile, Organization, Area_code_2020, Weixin, Weibo, Toutiao, Qita, News, Douyin, \ CheckCode from dashboard.yunpian import YunPian +import os def refresh_captcha(request): @@ -315,3 +316,7 @@ def get_organization(request): topten_list.append(d) print(str(topten_list)) return render(request, 'dashboard/results_by_keywords.html', {'topten_list': topten_list}) + + +def wechat_verify(request): + return HttpResponse("12711129958859553843")