Opened 11 years ago
Closed 11 years ago
#21331 closed Uncategorized (duplicate)
Could not login user using test.client.Client.login when 'django.contrib.sessions' is not in settings.INSTALLED_APPS
Description ¶
Hello,
I'm using django session based on cache, so I don't put 'django.contrib.sessions' in INSTALLED_APPS. Everything works fine except the tests (user login attempt always fails).
In django.test.client.Client.login line 549, there is condition:
if user and user.is_active \ and 'django.contrib.sessions' in settings.INSTALLED_APPS: ...
Why do we need this part:
'django.contrib.sessions' in settings.INSTALLED_APPS
?
Note:
See TracTickets
for help on using tickets.
I think perhaps the check should be for SESSION_BACKEND