UserProfile model.
Functions
| get_object_or_404(klass, *args, **kwargs) | Uses get() to return an object, or raises a Http404 exception if the object does not exist. | 
Classes
| CleanSave | Mixin for model classes. | 
| DefaultMeta | Base class for model Meta classes in the maasserver app. | 
| Manager() | |
| Model(*args, **kwargs) | |
| OneToOneField(to[, to_field]) | A OneToOneField is essentially the same as a ForeignKey, with the exception that always carries a “unique” constraint with it and the reverse relation always returns the object pointed to (since there will only ever be one), rather than returning a list. | 
| Token(*args, **kwargs) | Token(id, key, secret, verifier, token_type, timestamp, is_approved, user_id, consumer_id, callback, callback_confirmed) | 
| User(*args, **kwargs) | Users within the Django authentication system are represented by this model. | 
| UserProfile(*args, **kwargs) | A User profile to store MAAS specific methods and fields. | 
| UserProfileManager() | A utility to manage the collection of UserProfile (or User). | 
Exceptions
| CannotDeleteUserException | User can’t be deleted. | 
Bases: maasserver.models.cleansave.CleanSave, django.db.models.base.Model
A User profile to store MAAS specific methods and fields.
| Variables: | user – The related User. | 
|---|
Fetches all the user’s OAuth tokens.
| Returns: | A QuerySet of the tokens. | 
|---|---|
| Return type: | django.db.models.query.QuerySet | 
Create a new Token and its related Consumer (OAuth authorisation).
| Returns: | A tuple containing the Consumer and the Token that were created. | 
|---|---|
| Return type: | tuple | 
Delete the user’s OAuth token wich key token_key.
| Parameters: | token_key (string) – The key of the token to be deleted. | 
|---|---|
| Raises: | django.http.Http404 |