tags: python web
The error message is as follows:
Clickadd to Shopping Cart The page prompts 500 server error

The error displayed on the terminal is:

Find the role of APPEND_SLASHhttps://www.liurongxing.com/django-append_slash-true.html

It can be seen that it should be a url configuration problem
View the code of the ajax part in urls.py and detail.html


There are two ways to solve the problem
Method 1: The part in the red box above is changed to (recommended)


Method 2: Change the part in the red box above to


Problem solving ok! ! !
Click again to add shopping cart, success
Problem Description: Today, I am doing a login interface, and the FORM form is submitted, there is no problem, but later I want to use AJAX, then! ! ! ! There is a dead 403 and 500, and then let's tak...
First plus from form POST http://127.0.0.1:8000/login/ 403 (Forbidden) send @ jquery.min.js:6 ajax @ jquery.min.js:6 (anonymous) @ (index):37 dispatch @ jquery.min.js:5 y.handle @ jquery.m...
Ajax likes to report "POST http://192.168.XX.XX:9500/Excursion 500 (Internal Server Error)" when adding or modifying data Just add the following jQuery statement to the HTML form:...
Add the following content in settings.py With this setting, if the server generates a 500 error, the error message will be printed to the log/screen. You can also set other EMAIL_BACKEND so that the e...
Django ajax post request ‘csrfmiddlewaretoken’:‘{{ csrf_token }}’,...
When using the Vue project to request my Thinkphp5 backend on the Alibaba Cloud server, a 500 error was reported. After checking, it was found that no access permissions were added to the Thinkphp bac...
Spring mvc restfull form call api error As above, this form will report an error....
I encountered this problem today, and was dumbfounded. Then I found it for a long time, tried it for a long time, and finally solved it, writing a blog to commemorate it. First of all, I encountered t...
Problem analysis: 500, server error, and ajax call is no problem. Solution: By comparing the json object submitted by POST with the object received by the server, it is confirmed that the two objects ...
BUG appears: After replacing the production tool, use the Jupyter in Conda, you can load the directory normally, but click on iPyNB: 500: Internal Server Error. Solution Hand: Searching this error on ...