如何解决带有302问题的django admin错误? [英] How to resolve django admin error with 302 problems?

查看:129
本文介绍了如何解决带有302问题的django admin错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试登录django管理页面时,我不断收到错误消息.

I am continuously getting error while trying to log in to django admin page.

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
December 07, 2019 - 13:53:40
Django version 3.0, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Not Found: /
[07/Dec/2019 13:53:42] "GET / HTTP/1.1" 404 2027
[07/Dec/2019 13:53:47] "GET /admin HTTP/1.1" 301 0
[07/Dec/2019 13:53:47] "GET /admin/ HTTP/1.1" 302 0
[07/Dec/2019 13:53:47] "GET /admin/login/?next=/admin/ HTTP/1.1" 200 1913
[07/Dec/2019 13:53:47] "GET /static/admin/css/login.css HTTP/1.1" 200 1233
[07/Dec/2019 13:53:47] "GET /static/admin/css/base.css HTTP/1.1" 200 16378
[07/Dec/2019 13:53:47] "GET /static/admin/css/responsive.css HTTP/1.1" 200 18052
[07/Dec/2019 13:53:47] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
[07/Dec/2019 13:53:47] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692
[07/Dec/2019 13:53:47] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876
[07/Dec/2019 13:53:59] "POST /admin/login/?next=/admin/ HTTP/1.1" 302 0

然后它会自动关闭.

推荐答案

我使用python v3.7并出现了此问题.通过使用 python v3.8 并创建新的venv解决了此问题.

I used python v3.7 and got this issue. Solved this problem by using python v3.8 and creating a new venv.

现在我的python版本供参考:
在Win32上使用Python 3.8.2(tags/v3.8.2:7b3ab59,2020年2月25日,23:03:10)[MSC v.1916 64位(AMD64)]

Now my python version FYI:
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32

这篇关于如何解决带有302问题的django admin错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆