starts with no slash at the end of the path
- path ("schoolhot",xxx_funciton)
- can only access http://127.0.0.1:8000/schoolhot at this time.
change to the end of the path with a slash
- path ("schoolhot/",xxx_funciton)
- visiting http://127.0.0.1:8000/schoolhot will also redirect to http://127.0.0.1:8000/schoolhot/ at this time.
- visit http://127.0.0.1:8000/schoolhot/ is normal
change it to the first path above
- path ("schoolhot",xxx_funciton)
- visiting http://127.0.0.1:8000/schoolhot will also redirect to http://127.0.0.1:8000/schoolhot/ at this time.
- visit http://127.0.0.1:8000/schoolhot/ path mismatch
- looked at f12, which is indeed a browser redirect, not made by django
- the solution seems to be to clear the browser cache, so you can access http://127.0.0.1:8000/schoolhot .
- feel this. It"s too bad. it"s fine if you"ve never successfully accessed a path with a slash. Once the visit is successful, it will be recorded, and later visits without a slash will be directly redirected to a slash.