老师,我试了一下还是不行呀。我首先重置了密码:
python manage.py shell
Python 2.7.12 (default, Nov 3 2018, 04:44:04)
Type "copyright", "credits" or "license" for more information.
IPython 5.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from django.contrib.auth.models import User
In [2]: user =User.objects.get(username='admin')
In [3]: user.set_password('1234qwer')
In [4]: user.save()
In [5]: quit
然后去页面访问,查看runserver的输出
Exception happened during processing of request from ('61.135.155.34', 64146)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/SocketServer.py", line 596, in process_request_thread
self.finish_request(request, client_address)
File "/usr/local/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 102, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/SocketServer.py", line 652, in __init__
self.handle()