Django 使用SimpleUI 後,登出報錯
[12/Mar/2024 19:32:11] "GET /admin/logout/ HTTP/1.1" 405 0
Method Not Allowed (GET): /admin/logout/
Method Not Allowed: /admin/logout/
[12/Mar/2024 19:36:20] "GET /admin/logout/ HTTP/1.1" 405 0
原因
升級到 5.0後不適配。
修復
pip install Django==4.2
退到低版本Django4.2,秒變正常。
PS F:\BZCMS> pip install Django==4.2
Collecting Django==4.2
Downloading Django-4.2-py3-none-any.whl.metadata (4.1 kB)
Downloading Django-4.2-py3-none-any.whl (8.0 MB)
---------------------------------------- 8.0/8.0 MB 6.1 MB/s eta 0:00:00
Installing collected packages: Django
Attempting uninstall: Django
Found existing installation: Django 5.0.3
Uninstalling Django-5.0.3:
Successfully uninstalled Django-5.0.3
Successfully installed Django-4.2
PS F:\BZCMS>
PS F:\BZCMS>
PS F:\BZCMS> python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
March 12, 2024 - 19:57:21
Django version 4.2, using settings 'BZCMS.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[12/Mar/2024 19:57:27] "GET /admin/ HTTP/1.1" 200 21083
[12/Mar/2024 19:57:32] "GET /admin/logout/ HTTP/1.1" 302 0
[12/Mar/2024 19:57:32] "GET /admin/login/ HTTP/1.1" 200 4066
[12/Mar/2024 19:57:32] "GET /static/admin/simpleui-x/particles/particles.js HTTP/1.1" 304 0
...一個程式設計師改行後,手癢去程式設計,遇到的第一個Bug~~~~~~ 2024年3月12日20:04:51