Reputation: 26652
I'm trying to use to expando proprties of the User object:
user = self.auth.store.user_model.create_user(username, password_raw=password)
user.name = username
But I receive an error message:
user.name = username
AttributeError: 'tuple' object has no attribute 'name'
How should I do this for a User object instead of a tuple?
Thanks
Upvotes: 1
Views: 279
Reputation: 599490
create_user
returns a tuple of created, user
- the first is a boolean flag which shows whether or not the object was created.
created, user = self.auth.store.user_model.create_user(...
Upvotes: 3