RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and you have APPEND_S

提交表单报错:RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and you have APPEND_SLASH set.

RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/ajax_check/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
 

Solution:

RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. It 
prompts that the action address of the form is not at the end/end, and the value of APPEND_SLASH is Ture

Just change the action address of from to / end, 
or 
modify the settings: APPEND_SLASH=False

Guess you like

Origin blog.csdn.net/weixin_48154829/article/details/107802908