在 Django 上找不到页面 - 空路径

Page not found on Django - Empty paths

我正在尝试 运行 this library。我下载并复制到我的桌面上,然后我尝试 运行 它使用:

py -3.7 manage.py runserver

我得到了:

Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

但是当我转到那个 url 时,我不断收到此错误:

Page not found (404)
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Using the URLconf defined in django_google_authenticator.urls, Django tried these URL patterns, in this order:

^admin/login/$
^admin/
The empty path didn't match any of these.

我不明白哪里出了问题,有人可以帮助我吗?提前致谢!

我认为这是 Django 的正常行为,如您所见,它表示您的路径与任何已配置的路径都不匹配,例如管理员,所以您为什么不尝试 http://127.0.0.1:8000/admin/访问 Django 管理员登录页面。

如果你想看到与基础 url 的 404 不同的东西,你需要 configure your urls 并且可能添加一个重定向视图,当基础 url 是使用它将重定向到您的管理员或其他首选页面。