DEV Community

Discussion on: Prevent Multiple Sessions for a User in your Django Application

Collapse
 
vuthehuyht profile image
Vũ Thế Huy

After log in, I get error 'User' object has no attribute 'user_session'. How to fix this error?

Collapse
 
fleepgeek profile image
Emmanuel Okiche

Could you provide the code where this error points to.
This could be caused by different reasons.
Are you sure you're importing the User model from the right path?
Finally could you show where you used user_session in your code.