系统Win11Python版本3.10.4Django版本2浏览器:Chrome在文件名,url配置,view函数名等等,不要随便拼接下划线_,否则在浏览器访问的时候,容易报错。Pagenotfound(404)RequestMethod:GETRequestURL:http://127.0.0.1:8000/test_csrf/UsingtheURLconfdefinedinmysite7.urls,DjangotriedtheseURLpatterns,inthisorder:admin/test_cachetest_mwtest_csrfabcThecurrentpath,test_cs
Django-Ajax:sendingurlparamsindata我正在尝试通过Ajax向Django服务器发送"GET"和"POST"请求。首先,我提供URLConf:1url(r'^write_to_file/(?P.*)/(?P.*)/$',generalFunctions.write_to_file,name='write_to_file'),现在,AJAX部分。以前,我曾经这样做过(避免在数据中发送参数)1234567891011$.ajax({ type:"GET", url:'/write_to_file/'+file_name+'/'+content, da
Django-Ajax:sendingurlparamsindata我正在尝试通过Ajax向Django服务器发送"GET"和"POST"请求。首先,我提供URLConf:1url(r'^write_to_file/(?P.*)/(?P.*)/$',generalFunctions.write_to_file,name='write_to_file'),现在,AJAX部分。以前,我曾经这样做过(避免在数据中发送参数)1234567891011$.ajax({ type:"GET", url:'/write_to_file/'+file_name+'/'+content, da