Updated User object for Django 1.5 compatibility.

Setting the pk attribute of the User object for Django 1.5 compatibility.

In Django 1.4, the id of the User object was used as the unique identifier. In Django 1.5, the pk is now used instead of id.



Here is the related code change in Django: 0eeae15056
This commit is contained in:
linhuacheng
2013-04-05 17:48:47 -07:00
parent 0ad712a52c
commit 6235d54def

View File

@@ -68,6 +68,7 @@ class User(AnonymousUser):
service_catalog=None, tenant_name=None, roles=None,
authorized_tenants=None, endpoint=None, enabled=False):
self.id = id
self.pk = id
self.token = token
self.username = user
self.tenant_id = tenant_id