oauth2client.contrib.django_util.storage module¶
Contains a storage module that stores credentials using the Django ORM.
-
class
oauth2client.contrib.django_util.storage.DjangoORMStorage(model_class, key_name, key_value, property_name)[source]¶ Bases:
oauth2client.client.StorageStore and retrieve a single credential to and from the Django datastore.
This Storage helper presumes the Credentials have been stored as a CredentialsField on a db model class.
-
locked_get()[source]¶ Retrieve stored credential from the Django ORM.
Returns: - oauth2client.Credentials retrieved from the Django ORM, associated
- with the
model,key_value->``key_name`` pair used to query for the model, andproperty_nameidentifying theCredentialsPropertyfield, all of which are defined in the constructor for this Storage object.
-