관리 메뉴

웹개발자의 기지개

[Django] 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. 본문

python/Django

[Django] 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.

http://portfolio.wonpaper.net 2023. 10. 22. 20:30

 

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/memberShip/join/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.

 

런타임 오류로 흔히 만날수 있는 에러메세지이다.

 

APPEND_SLASH 가 설정상으로 디폴트로 True 가 되어 있는데, URL 의 마지막에 /가 없어서 경로가 안맞아서 그렇다.

 

 

form.action = "/memberShip/login/";

형태로 마지막에 / 를 넣어서 해결~

Comments