Solved: Django reports an error when running a POST request: Forbidden (CSRF cookie not set.)

Solution: Comment out the django.middleware.csrf.CsrfViewMiddleware statement for MIDDLEWARE in setting.py in the project file
and then run it successfully.
insert image description here

Guess you like

Origin blog.csdn.net/daxiangaifashi/article/details/122542062