We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
把这行
user = authenticate(request, username=username, password=password)
改成
user = User.objects.get(username='admin')
即可以任意用户名密码登录成admin
The text was updated successfully, but these errors were encountered:
对不起,我标题党了,得再加行import:
from django.contrib.auth.models import User
Sorry, something went wrong.
import 也是对象,所以还是可以写成一行(
No branches or pull requests
把这行
改成
即可以任意用户名密码登录成admin
The text was updated successfully, but these errors were encountered: