子钦加油

扩大
缩小

Django项目配置微信相关安全文件路由url访问

 

 从微信下载安全验证文件上传到服务器django项目的templates目录下

配置相应的url路由确保能能通过微信验证

 

 

from django.views.generic import TemplateView

from django.conf.urls import url, include
from django.contrib import admin
from App import views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    #url(r'^$',TemplateView.as_view(template_name="pr.html"),name="index"),
    url(r'^ruRSb2URBu.txt$', TemplateView.as_view(template_name="ruRSb2URBu.txt", content_type="text/plain"), name="test"),
    url(r'^$', views.price_record, name='index'),
    url(r'^survey/', include('App.urls', namespace='survey')),
]  

通过域名/ruRSb2URBu.txt

如图所示

 

posted on 2020-06-26 20:44  子钦加油  阅读(240)  评论(0编辑  收藏  举报

导航

返回顶部