| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: module oauth2client.django_orm</title> |
| </head><body bgcolor="#f0f0f8"> |
| |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| <tr bgcolor="#7799ee"> |
| <td valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="oauth2client.html"><font color="#ffffff">oauth2client</font></a>.django_orm</strong></big></big></font></td |
| ><td align=right valign=bottom |
| ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/apiary/oauth2client/django_orm.py">/home/jcgregorio/projects/apiary/oauth2client/django_orm.py</a></font></td></tr></table> |
| <p><tt>OAuth 2.0 utilities for Django.<br> |
| <br> |
| Utilities for using OAuth 2.0 in conjunction with<br> |
| the Django datastore.</tt></p> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#aa55cc"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
| <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="base64.html">base64</a><br> |
| </td><td width="25%" valign=top><a href="django.db.models.html">django.db.models</a><br> |
| </td><td width="25%" valign=top><a href="oauth2client.html">oauth2client</a><br> |
| </td><td width="25%" valign=top><a href="pickle.html">pickle</a><br> |
| </td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ee77aa"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| <td width="100%"><dl> |
| <dt><font face="helvetica, arial"><a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="oauth2client.django_orm.html#CredentialsField">CredentialsField</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="oauth2client.django_orm.html#FlowField">FlowField</a> |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="oauth2client.django_orm.html#Storage">Storage</a> |
| </font></dt></dl> |
| </dd> |
| </dl> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="CredentialsField">class <strong>CredentialsField</strong></a>(<a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="oauth2client.django_orm.html#CredentialsField">CredentialsField</a></dd> |
| <dd><a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="CredentialsField-contribute_to_class"><strong>contribute_to_class</strong></a>(self, cls, name)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-db_type"><strong>db_type</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-get_db_prep_value"><strong>get_db_prep_value</strong></a>(self, value)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-to_python"><strong>to_python</strong></a>(self, value)</dt></dl> |
| |
| <hr> |
| Data and other attributes defined here:<br> |
| <dl><dt><strong>__metaclass__</strong> = <class 'django.db.models.fields.subclassing.SubfieldBase'><dd><tt>A metaclass for custom <a href="django.db.models.fields.html#Field">Field</a> subclasses. This ensures the model's attribute<br> |
| has the descriptor protocol attached to it.</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>:<br> |
| <dl><dt><a name="CredentialsField-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-__deepcopy__"><strong>__deepcopy__</strong></a>(self, memodict)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-__init__"><strong>__init__</strong></a>(self, verbose_name<font color="#909090">=None</font>, name<font color="#909090">=None</font>, primary_key<font color="#909090">=False</font>, max_length<font color="#909090">=None</font>, unique<font color="#909090">=False</font>, blank<font color="#909090">=False</font>, null<font color="#909090">=False</font>, db_index<font color="#909090">=False</font>, rel<font color="#909090">=None</font>, default<font color="#909090">=<class django.db.models.fields.NOT_PROVIDED></font>, editable<font color="#909090">=True</font>, serialize<font color="#909090">=True</font>, unique_for_date<font color="#909090">=None</font>, unique_for_month<font color="#909090">=None</font>, unique_for_year<font color="#909090">=None</font>, choices<font color="#909090">=None</font>, help_text<font color="#909090">=''</font>, db_column<font color="#909090">=None</font>, db_tablespace<font color="#909090">=None</font>, auto_created<font color="#909090">=False</font>)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-bind"><strong>bind</strong></a>(self, fieldmapping, original, bound_field_class)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-formfield"><strong>formfield</strong></a>(self, form_class<font color="#909090">=<class 'django.forms.fields.CharField'></font>, **kwargs)</dt><dd><tt>Returns a django.forms.<a href="django.db.models.fields.html#Field">Field</a> instance for this database <a href="django.db.models.fields.html#Field">Field</a>.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-get_attname"><strong>get_attname</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-get_attname_column"><strong>get_attname_column</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-get_cache_name"><strong>get_cache_name</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-get_choices"><strong>get_choices</strong></a>(self, include_blank<font color="#909090">=True</font>, blank_choice<font color="#909090">=[('', '---------')]</font>)</dt><dd><tt>Returns choices with a default blank choices included, for use<br> |
| as SelectField choices for this field.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-get_choices_default"><strong>get_choices_default</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-get_db_prep_lookup"><strong>get_db_prep_lookup</strong></a>(self, lookup_type, value)</dt><dd><tt>Returns field's value prepared for database lookup.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-get_db_prep_save"><strong>get_db_prep_save</strong></a>(self, value)</dt><dd><tt>Returns field's value prepared for saving into a database.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-get_default"><strong>get_default</strong></a>(self)</dt><dd><tt>Returns the default value for this field.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-get_flatchoices"><strong>get_flatchoices</strong></a>(self, include_blank<font color="#909090">=True</font>, blank_choice<font color="#909090">=[('', '---------')]</font>)</dt><dd><tt>Returns flattened choices with a default blank choice included.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-get_internal_type"><strong>get_internal_type</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-get_validator_unique_lookup_type"><strong>get_validator_unique_lookup_type</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-has_default"><strong>has_default</strong></a>(self)</dt><dd><tt>Returns a boolean of whether this field has a default value.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-pre_save"><strong>pre_save</strong></a>(self, model_instance, add)</dt><dd><tt>Returns field's value just before saving.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-save_form_data"><strong>save_form_data</strong></a>(self, instance, data)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-set_attributes_from_name"><strong>set_attributes_from_name</strong></a>(self, name)</dt></dl> |
| |
| <dl><dt><a name="CredentialsField-value_from_object"><strong>value_from_object</strong></a>(self, obj)</dt><dd><tt>Returns the value of this field in the given model instance.</tt></dd></dl> |
| |
| <dl><dt><a name="CredentialsField-value_to_string"><strong>value_to_string</strong></a>(self, obj)</dt><dd><tt>Returns a string value of this field from the passed obj.<br> |
| This is used by the serialization framework.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>choices</strong></dt> |
| </dl> |
| <dl><dt><strong>flatchoices</strong></dt> |
| <dd><tt>Flattened version of choices tuple.</tt></dd> |
| </dl> |
| <dl><dt><strong>unique</strong></dt> |
| </dl> |
| <hr> |
| Data and other attributes inherited from <a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>:<br> |
| <dl><dt><strong>auto_creation_counter</strong> = -1</dl> |
| |
| <dl><dt><strong>creation_counter</strong> = 0</dl> |
| |
| <dl><dt><strong>empty_strings_allowed</strong> = True</dl> |
| |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="FlowField">class <strong>FlowField</strong></a>(<a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="oauth2client.django_orm.html#FlowField">FlowField</a></dd> |
| <dd><a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="FlowField-contribute_to_class"><strong>contribute_to_class</strong></a>(self, cls, name)</dt></dl> |
| |
| <dl><dt><a name="FlowField-db_type"><strong>db_type</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-get_db_prep_value"><strong>get_db_prep_value</strong></a>(self, value)</dt></dl> |
| |
| <dl><dt><a name="FlowField-to_python"><strong>to_python</strong></a>(self, value)</dt></dl> |
| |
| <hr> |
| Data and other attributes defined here:<br> |
| <dl><dt><strong>__metaclass__</strong> = <class 'django.db.models.fields.subclassing.SubfieldBase'><dd><tt>A metaclass for custom <a href="django.db.models.fields.html#Field">Field</a> subclasses. This ensures the model's attribute<br> |
| has the descriptor protocol attached to it.</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>:<br> |
| <dl><dt><a name="FlowField-__cmp__"><strong>__cmp__</strong></a>(self, other)</dt></dl> |
| |
| <dl><dt><a name="FlowField-__deepcopy__"><strong>__deepcopy__</strong></a>(self, memodict)</dt></dl> |
| |
| <dl><dt><a name="FlowField-__init__"><strong>__init__</strong></a>(self, verbose_name<font color="#909090">=None</font>, name<font color="#909090">=None</font>, primary_key<font color="#909090">=False</font>, max_length<font color="#909090">=None</font>, unique<font color="#909090">=False</font>, blank<font color="#909090">=False</font>, null<font color="#909090">=False</font>, db_index<font color="#909090">=False</font>, rel<font color="#909090">=None</font>, default<font color="#909090">=<class django.db.models.fields.NOT_PROVIDED></font>, editable<font color="#909090">=True</font>, serialize<font color="#909090">=True</font>, unique_for_date<font color="#909090">=None</font>, unique_for_month<font color="#909090">=None</font>, unique_for_year<font color="#909090">=None</font>, choices<font color="#909090">=None</font>, help_text<font color="#909090">=''</font>, db_column<font color="#909090">=None</font>, db_tablespace<font color="#909090">=None</font>, auto_created<font color="#909090">=False</font>)</dt></dl> |
| |
| <dl><dt><a name="FlowField-bind"><strong>bind</strong></a>(self, fieldmapping, original, bound_field_class)</dt></dl> |
| |
| <dl><dt><a name="FlowField-formfield"><strong>formfield</strong></a>(self, form_class<font color="#909090">=<class 'django.forms.fields.CharField'></font>, **kwargs)</dt><dd><tt>Returns a django.forms.<a href="django.db.models.fields.html#Field">Field</a> instance for this database <a href="django.db.models.fields.html#Field">Field</a>.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-get_attname"><strong>get_attname</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-get_attname_column"><strong>get_attname_column</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-get_cache_name"><strong>get_cache_name</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-get_choices"><strong>get_choices</strong></a>(self, include_blank<font color="#909090">=True</font>, blank_choice<font color="#909090">=[('', '---------')]</font>)</dt><dd><tt>Returns choices with a default blank choices included, for use<br> |
| as SelectField choices for this field.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-get_choices_default"><strong>get_choices_default</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-get_db_prep_lookup"><strong>get_db_prep_lookup</strong></a>(self, lookup_type, value)</dt><dd><tt>Returns field's value prepared for database lookup.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-get_db_prep_save"><strong>get_db_prep_save</strong></a>(self, value)</dt><dd><tt>Returns field's value prepared for saving into a database.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-get_default"><strong>get_default</strong></a>(self)</dt><dd><tt>Returns the default value for this field.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-get_flatchoices"><strong>get_flatchoices</strong></a>(self, include_blank<font color="#909090">=True</font>, blank_choice<font color="#909090">=[('', '---------')]</font>)</dt><dd><tt>Returns flattened choices with a default blank choice included.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-get_internal_type"><strong>get_internal_type</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-get_validator_unique_lookup_type"><strong>get_validator_unique_lookup_type</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="FlowField-has_default"><strong>has_default</strong></a>(self)</dt><dd><tt>Returns a boolean of whether this field has a default value.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-pre_save"><strong>pre_save</strong></a>(self, model_instance, add)</dt><dd><tt>Returns field's value just before saving.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-save_form_data"><strong>save_form_data</strong></a>(self, instance, data)</dt></dl> |
| |
| <dl><dt><a name="FlowField-set_attributes_from_name"><strong>set_attributes_from_name</strong></a>(self, name)</dt></dl> |
| |
| <dl><dt><a name="FlowField-value_from_object"><strong>value_from_object</strong></a>(self, obj)</dt><dd><tt>Returns the value of this field in the given model instance.</tt></dd></dl> |
| |
| <dl><dt><a name="FlowField-value_to_string"><strong>value_to_string</strong></a>(self, obj)</dt><dd><tt>Returns a string value of this field from the passed obj.<br> |
| This is used by the serialization framework.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>choices</strong></dt> |
| </dl> |
| <dl><dt><strong>flatchoices</strong></dt> |
| <dd><tt>Flattened version of choices tuple.</tt></dd> |
| </dl> |
| <dl><dt><strong>unique</strong></dt> |
| </dl> |
| <hr> |
| Data and other attributes inherited from <a href="django.db.models.fields.html#Field">django.db.models.fields.Field</a>:<br> |
| <dl><dt><strong>auto_creation_counter</strong> = -1</dl> |
| |
| <dl><dt><strong>creation_counter</strong> = 0</dl> |
| |
| <dl><dt><strong>empty_strings_allowed</strong> = True</dl> |
| |
| </td></tr></table> <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="Storage">class <strong>Storage</strong></a>(<a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Store and retrieve a single credential to and from<br> |
| the datastore.<br> |
| <br> |
| This <a href="#Storage">Storage</a> helper presumes the Credentials<br> |
| have been stored as a CredenialsField<br> |
| on a db model class.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="oauth2client.django_orm.html#Storage">Storage</a></dd> |
| <dd><a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="Storage-__init__"><strong>__init__</strong></a>(self, model_class, key_name, key_value, property_name)</dt><dd><tt>Constructor for <a href="#Storage">Storage</a>.<br> |
| <br> |
| Args:<br> |
| model: db.Model, model class<br> |
| key_name: string, key name for the entity that has the credentials<br> |
| key_value: string, key value for the entity that has the credentials<br> |
| property_name: string, name of the property that is an CredentialsProperty</tt></dd></dl> |
| |
| <dl><dt><a name="Storage-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve Credential from datastore.<br> |
| <br> |
| Returns:<br> |
| oauth2client.Credentials</tt></dd></dl> |
| |
| <dl><dt><a name="Storage-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write a Credentials to the datastore.<br> |
| <br> |
| Args:<br> |
| credentials: Credentials, the credentials to store.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#55aa55"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
| <td width="100%"><strong>__author__</strong> = '[email protected] (Joe Gregorio)'</td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#7799ee"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| <td width="100%">[email protected] (Joe Gregorio)</td></tr></table> |
| </body></html> |