What's the difference between authenticate and login?
问题 Documentation: https://docs.djangoproject.com/en/1.7/topics/auth/default/#django.contrib.auth.login When you’re manually logging a user in, you must call authenticate() before you call login(). authenticate() sets an attribute on the User noting which authentication backend successfully authenticated that user (see the backends documentation for details), and this information is needed later during the login process. An error will be raised if you try to login a user object retrieved from the