0

我正在使用 apache2、wsgi 和 django。error.log 中有一些日志。我的项目中的身份验证有问题。但我无法从以下日志中弄清楚为什么。为什么在某些折叠中找不到用户?

欢迎任何提示。谢谢。

RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[notice] Apache/2.2.22 (Ubuntu) mod_ssl/2.2.22 OpenSSL/1.0.1 mod_wsgi/3.3 Python/2.7.2 configured -- resuming normal operations
[error] [client myip] user username not found: /myproject/admin/status/ referer: https://10.32.64.3/reporting-central/login/?next=/myproject/admin/status/

更新

我发现问题可能与以下代码有关。登录失败。

@login_required
def status(request):
        return render(request, 'status.html', {'title': 'status'})
4

1 回答 1

-1

您是否检查过数据库中的该用户条目?尝试迁移您的数据库

python manage.py migrate

并确保创建了管理员用户:

python manage.py createsuperuser
于 2016-05-10T16:14:37.213 回答