oauth2client.django_orm module¶
OAuth 2.0 utilities for Django.
Utilities for using OAuth 2.0 in conjunction with the Django datastore.
-
class
oauth2client.django_orm.
CredentialsField
(*args, **kwargs)[source]¶ Bases:
django.db.models.fields.Field
-
contribute_to_class
(cls, name, **kwargs)¶
-
get_internal_type
()¶
-
get_prep_value
(value)¶
-
to_python
(value)¶
-
value_to_string
(obj)¶ Convert the field value from the provided model to a string.
Used during model serialization.
Parameters: obj – db.Model, model object Returns: string, the serialized field value
-
-
class
oauth2client.django_orm.
FlowField
(*args, **kwargs)[source]¶ Bases:
django.db.models.fields.Field
-
contribute_to_class
(cls, name, **kwargs)¶
-
get_internal_type
()¶
-
get_prep_value
(value)¶
-
to_python
(value)¶
-
value_to_string
(obj)¶ Convert the field value from the provided model to a string.
Used during model serialization.
Parameters: obj – db.Model, model object Returns: string, the serialized field value
-
-
class
oauth2client.django_orm.
Storage
(model_class, key_name, key_value, property_name)[source]¶ Bases:
oauth2client.client.Storage
Store and retrieve a single credential to and from the Django datastore.
This Storage helper presumes the Credentials have been stored as a CredenialsField on a db model class.