Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assert CompareEq Call NameLoad NameLoad Num Str Assign NameStore SubscriptLoad NameLoad Index Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareNotIn NameLoad TupleLoad Str Str body Assert CompareNotIn NameLoad AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr kwarg body Expr Str Assign NameStore Dict Str AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Str orelse Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore ListLoad If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad Str Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad TupleLoad NameLoad Str body Return NameLoad If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Return NameLoad Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict If Call NameLoad NameLoad Str body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq Call AttributeLoad NameLoad attr Str body Return NameLoad Return Call NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Str Str Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return ListLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If NameLoad body If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Str Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr NameLoad name NameStore body Raise Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str Dict decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore TupleLoad Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults AttributeLoad SubscriptLoad NameLoad Index Num attr For NameStore SubscriptLoad NameLoad Slice Num body If Call NameLoad NameLoad Str body Assign NameStore BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareGt Call NameLoad NameLoad Num body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body If BoolOpAnd NameLoad CompareIsNot SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr keyword Lambda arguments args NameParam defaults AttributeLoad SubscriptLoad NameLoad Index Num attr body If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn NameLoad AttributeLoad NameLoad attr body Continue If BoolOpAnd AttributeLoad NameLoad attr CompareIn NameLoad AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad AugAssignAdd NameStore Num Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign SubscriptStore NameLoad Index Str NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict If CompareIsNot NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr body If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn NameLoad AttributeLoad NameLoad attr body Continue If BoolOpAnd AttributeLoad NameLoad attr CompareIn NameLoad AttributeLoad NameLoad attr body Continue Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr CompareIsNot NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Str orelse Assign NameStore Str If AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad ListLoad TupleLoad Str Call NameLoad keyword Str For TupleStore NameStore NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd UnaryOpNot NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad orelse For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Continue Expr Call NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad decorator_list
N/A N/A Support for creating Kay forms from Datastore data models.

Taken from google.appengine.ext.db.djangoforms

Terminology notes:
  - forms: always refers to the Kay newforms subpackage
  - field: always refers to a Kay forms.Field instance
  - property: always refers to a db.Property instance

Mapping between properties and fields:

+====================+===================+==============+====================+
| Property subclass  | Field subclass    | datatype     | widget; notes      |
+====================+===================+==============+====================+
| StringProperty     | TextField         | unicode      | Textarea           |
|                    |                   |              | if multiline       |
+--------------------+-------------------+--------------+--------------------+
| TextProperty       | TextField         | unicode      | Textarea           |
+--------------------+-------------------+--------------+--------------------+
| BlobProperty       | FileField         | str          | skipped in v0.96   |
+--------------------+-------------------+--------------+--------------------+
| DateTimeProperty   | DateTimeField     | datetime     | skipped            |
|                    |                   |              | if auto_now[_add]  |
+--------------------+-------------------+--------------+--------------------+
| DateProperty       | DateField         | date         | ditto              |
+--------------------+-------------------+--------------+--------------------+
| TimeProperty       | TimeField         | time         | ditto              |
+--------------------+-------------------+--------------+--------------------+
| IntegerProperty    | IntegerField      | int or long  |                    |
+--------------------+-------------------+--------------+--------------------+
| FloatProperty      | FloatField        | float        | CharField in v0.96 |
+--------------------+-------------------+--------------+--------------------+
| BooleanProperty    | BooleanField      | bool         |                    |
+--------------------+-------------------+--------------+--------------------+
| UserProperty       | TextField         | users.User   |                    |
+--------------------+-------------------+--------------+--------------------+
| StringListProperty | TextField         | list of str  | Textarea           |
+--------------------+-------------------+--------------+--------------------+
| LinkProperty       | TextField         | str          |                    |
+--------------------+-------------------+--------------+--------------------+
| ReferenceProperty  | ModelField*       | db.Model     |                    |
+--------------------+-------------------+--------------+--------------------+
| _ReverseReferenceP.| None              | <iterable>   | always skipped     |
+====================+===================+==============+====================+

 N/A itertools N/A logging google.appengine.api users google.appengine.ext db kay exceptions kay.utils forms kay.utils datastructures kay.i18n lazy_gettext _ kay.exceptions ImproperlyConfigured kay.models NamedModel monkey_patch N/A N/A name bases namespace N/A N/A N/A A 'metaclass' for adding new methods to an existing class.

  In this version, existing methods can't be overridden; this is by
  design, to avoid accidents.

  Usage example:

    class PatchClass(TargetClass):
      __metaclass__ = monkey_patch
      def foo(self, ...): ...
      def bar(self, ...): ...

  This is equivalent to:

    def foo(self, ...): ...
    def bar(self, ...): ...
    TargetClass.foo = foo
    TargetClass.bar = bar
    PatchClass = TargetClass

  Note that PatchClass becomes an alias for TargetClass; by convention
  it is recommended to give PatchClass the same name as TargetClass.
   N/A N/A N/A len bases 1 Exactly one base class is required N/A base N/A bases N/A 0 N/A N/A name value N/A N/A namespace iteritems N/A N/A N/A name N/A __metaclass__ __module__ N/A N/A N/A name N/A base __dict__ N/A Won't override attribute %r N/A name N/A N/A setattr base name value N/A base N/A Property N/A N/A db Property N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self form_class N/A N/A forms TextField kwargs N/A N/A Return a Django form field appropriate for this property.

    Args:
      form_class: a forms.Field subclass, default forms.CharField

    Additional keyword arguments are passed to the form_class constructor,
    with certain defaults:
      required: self.required
      label: prettified self.verbose_name, if not None
      widget: a forms.Select instance if self.choices is non-empty
      initial: self.default, if not None

    Returns:
       A fully configured instance of form_class, or None if no form
       field should be generated for this property.
     N/A defaults N/A required N/A self required N/A N/A N/A self verbose_name None N/A N/A N/A defaults N/A label N/A N/A N/A N/A N/A self name capitalize replace _ N/A N/A N/A defaults N/A label N/A self verbose_name N/A N/A self choices N/A N/A choices N/A N/A N/A N/A N/A self required N/A N/A N/A self default None N/A initial kwargs N/A N/A N/A N/A choices append N/A --------- N/A choice N/A self choices N/A N/A N/A N/A choices append N/A N/A unicode choice N/A unicode choice N/A N/A defaults N/A choices choices N/A form_class N/A forms ChoiceField N/A N/A N/A self default None N/A N/A N/A defaults N/A default N/A self default N/A N/A N/A defaults update kwargs N/A N/A form_class defaults N/A get_value_for_form N/A N/A self instance N/A N/A N/A Extract the property value from the instance for use in a form.

    Override this to do a property- or field-specific type conversion.

    Args:
      instance: a db.Model instance

    Returns:
      The property's value extracted from the instance, possibly
      converted to a type suitable for a form field; possibly None.

    By default this returns the instance attribute's value unchanged.
     N/A N/A getattr instance N/A self name N/A make_value_from_form N/A N/A self value N/A N/A N/A Convert a form value to a property value.

    Override this to do a property- or field-specific type conversion.

    Args:
      value: the cleaned value retrieved from the form field

    Returns:
      A value suitable for assignment to a model instance's property;
      possibly None.

    By default this converts the value to self.data_type if it
    isn't already an instance of that type, except if the value is
    empty, in which case we return None.
     N/A N/A value N/A None N/A N/A None N/A N/A N/A isinstance value N/A self data_type N/A N/A value N/A N/A self data_type value N/A value N/A N/A UserProperty N/A N/A db Property N/A N/A This class exists solely to log a warning when it is used. __init__ N/A N/A self N/A args kwds N/A N/A N/A N/A logging warn Please don't use modelforms.UserProperty; use db.UserProperty instead. N/A N/A N/A N/A super UserProperty self __init__ args kwds N/A N/A EmailProperty N/A N/A db EmailProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A defaults N/A form_class N/A forms EmailField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super EmailProperty self get_form_field defaults N/A N/A StringProperty N/A N/A db StringProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a string property.

    This sets the widget default to forms.Textarea if the property's
    multiline attribute is set.
     N/A defaults N/A N/A N/A self multiline N/A N/A N/A defaults N/A widget N/A forms Textarea N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super StringProperty self get_form_field defaults N/A N/A TextProperty N/A N/A db TextProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a text property.

    This sets the widget default to forms.Textarea.
     N/A defaults N/A widget N/A forms Textarea N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super TextProperty self get_form_field defaults N/A N/A BlobProperty N/A N/A db BlobProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a blob property.

     N/A N/A N/A hasattr forms FileField N/A N/A None N/A defaults N/A form_class N/A forms FileField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super BlobProperty self get_form_field defaults N/A get_value_for_form N/A N/A self instance N/A N/A N/A Extract the property value from the instance for use in a form.

    There is no way to convert a Blob into an initial value for a file
    upload, so we always return None.
     N/A None N/A make_value_from_form N/A N/A self value N/A N/A N/A Convert a form value to a property value.

    This extracts the content from the UploadedFile instance returned
    by the FileField instance.
     N/A N/A N/A N/A value __class__ __name__ UploadedFile N/A N/A N/A N/A db Blob N/A value content N/A N/A N/A N/A super BlobProperty self make_value_from_form value N/A N/A DateTimeProperty N/A N/A db DateTimeProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a date-time property.

    This defaults to a DateTimeField instance, except if auto_now or
    auto_now_add is set, in which case None is returned, as such
    'auto' fields should not be rendered as part of the form.
     N/A N/A N/A self auto_now N/A self auto_now_add N/A N/A None N/A defaults N/A form_class N/A forms DateTimeField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super DateTimeProperty self get_form_field defaults N/A N/A DateProperty N/A N/A db DateProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a date property.

    This defaults to a DateField instance, except if auto_now or
    auto_now_add is set, in which case None is returned, as such
    'auto' fields should not be rendered as part of the form.
     N/A N/A N/A self auto_now N/A self auto_now_add N/A N/A None N/A defaults N/A form_class N/A forms DateField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super DateProperty self get_form_field defaults N/A N/A TimeProperty N/A N/A db TimeProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a time property.

    This defaults to a TimeField instance, except if auto_now or
    auto_now_add is set, in which case None is returned, as such
    'auto' fields should not be rendered as part of the form.
     N/A N/A N/A self auto_now N/A self auto_now_add N/A N/A None N/A defaults N/A form_class N/A forms TimeField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super TimeProperty self get_form_field defaults N/A N/A IntegerProperty N/A N/A db IntegerProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for an integer property.

    This defaults to an IntegerField instance.
     N/A defaults N/A form_class N/A forms IntegerField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super IntegerProperty self get_form_field defaults N/A N/A FloatProperty N/A N/A db FloatProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for an integer property.

    This defaults to a FloatField instance when using Django 0.97 or
    later.  For 0.96 this defaults to the CharField class.
     N/A defaults N/A N/A N/A hasattr forms FloatField N/A N/A N/A defaults N/A form_class N/A forms FloatField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super FloatProperty self get_form_field defaults N/A N/A BooleanProperty N/A N/A db BooleanProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a boolean property.

    This defaults to a BooleanField.
     N/A defaults N/A form_class N/A forms BooleanField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super BooleanProperty self get_form_field defaults N/A make_value_from_form N/A N/A self value N/A N/A N/A Convert a form value to a property value.

    This is needed to ensure that False is not replaced with None.
     N/A N/A value None N/A N/A None N/A N/A N/A isinstance value basestring N/A N/A N/A value lower false N/A N/A False N/A N/A bool value N/A N/A StringListProperty N/A N/A db StringListProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a StringList property.

    This defaults to a Textarea widget with a blank initial value.
     N/A defaults N/A field form_class min_size N/A N/A forms TextField N/A forms LineSeparated 0 N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super StringListProperty self get_form_field defaults N/A get_value_for_form N/A N/A self instance N/A N/A N/A Extract the property value from the instance for use in a form.

    This joins a list of strings with newlines.
     N/A value N/A N/A N/A super StringListProperty self get_value_for_form instance N/A N/A value N/A N/A None N/A N/A isinstance value list N/A N/A value N/A N/A join value N/A value N/A make_value_from_form N/A N/A self value N/A N/A N/A Convert a form value to a property value.

    This breaks the string into lines.
     N/A N/A value N/A N/A N/A N/A N/A isinstance value basestring N/A N/A value N/A N/A value splitlines N/A value N/A N/A LinkProperty N/A N/A db LinkProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a URL property.

    This defaults to a URLField instance.
     N/A defaults N/A form_class N/A forms TextField N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super LinkProperty self get_form_field defaults N/A N/A _WrapIter N/A object N/A N/A Helper class whose iter() calls a given function to get an iterator. __init__ N/A N/A self function N/A N/A N/A N/A self _function function N/A __iter__ N/A N/A self N/A N/A N/A N/A N/A self _function N/A N/A ReferenceProperty N/A N/A db ReferenceProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a reference property.

    This defaults to a ModelChoiceField instance.
     N/A defaults N/A form_class model N/A forms ModelField N/A self reference_class N/A N/A N/A defaults update kwargs N/A N/A N/A N/A super ReferenceProperty self get_form_field defaults N/A get_value_for_form N/A N/A self instance N/A N/A N/A Extract the property value from the instance for use in a form.

    This return the key object for the referenced object, or None.
     N/A value N/A N/A N/A super ReferenceProperty self get_value_for_form instance N/A N/A value None N/A N/A value N/A N/A value key N/A value N/A make_value_from_form N/A N/A self value N/A N/A N/A Convert a form value to a property value.

    This turns a key string or object into a model instance.
     N/A value N/A N/A N/A N/A isinstance value N/A db Model N/A N/A value N/A N/A db get value N/A value N/A N/A _ReverseReferenceProperty N/A N/A db _ReverseReferenceProperty N/A N/A __metaclass__ monkey_patch get_form_field N/A N/A self N/A kwargs N/A N/A Return a Django form field appropriate for a reverse reference.

    This always returns None, since reverse references are always
    automatic.
     N/A None N/A N/A property_clean N/A N/A prop value N/A N/A N/A Apply Property level validation to value.

  Calls .make_value_from_form() and .validate() on the property and catches
  exceptions generated by either.  The exceptions are converted to
  forms.ValidationError exceptions.

  Args:
    prop: The property to validate against.
    value: The value to validate.

  Raises:
    forms.ValidationError if the value cannot be validated.
   N/A N/A value None N/A N/A N/A N/A N/A N/A prop validate N/A N/A prop make_value_from_form value N/A N/A N/A N/A N/A db BadValueError ValueError N/A e N/A N/A N/A N/A forms ValidationError N/A unicode e N/A ModelFormOptions N/A object N/A N/A A simple class to hold internal options for a ModelForm class.

  Instance attributes:
    model: a db.Model class, or None
    fields: list of field names to be defined, or None
    exclude: list of field names to be skipped, or None

  These instance attributes are copied from the 'Meta' class that is
  usually present in a ModelForm class, and all default to None.
   __init__ N/A N/A self options N/A None N/A N/A N/A self model N/A getattr options model None N/A N/A self fields N/A getattr options fields None N/A N/A self exclude N/A getattr options exclude None N/A N/A self help_texts N/A getattr options help_texts N/A N/A N/A ModelFormMetaclass N/A N/A forms FormMeta N/A N/A The metaclass for the ModelForm class defined below.

  See the docs for ModelForm below for a usage example.
   N/A bad_attr_names N/A data errors raw_data __new__ N/A N/A cls class_name bases attrs N/A N/A N/A Constructor for a new ModelForm class instance.

    The signature of this method is determined by Python internals.

     N/A fields N/A sorted N/A N/A field_name N/A N/A attrs pop field_name N/A N/A field_name obj N/A N/A attrs items N/A isinstance obj N/A forms Field key N/A N/A N/A obj N/A N/A N/A obj N/A 1 creation_counter N/A base N/A bases N/A -1 N/A N/A N/A hasattr base _base_fields N/A N/A fields N/A N/A N/A N/A base _base_fields items fields N/A declared_fields N/A N/A datastructures OrderedDict N/A N/A field_name obj fields N/A N/A N/A declared_fields N/A field_name obj N/A opts N/A ModelFormOptions N/A N/A attrs get Meta None N/A N/A attrs N/A _meta opts N/A base_models N/A N/A base bases N/A N/A base_opts N/A getattr base _meta None N/A base_model N/A getattr base_opts model None N/A N/A base_model None N/A N/A N/A N/A base_models append base_model N/A N/A N/A len base_models 1 N/A N/A N/A N/A exceptions ImproperlyConfigured N/A %s's base classes define more than one model. class_name N/A N/A N/A opts model None N/A N/A N/A base_models N/A N/A base_models N/A 0 N/A opts model N/A N/A N/A N/A exceptions ImproperlyConfigured N/A %s defines a different model than its parent. class_name N/A model_fields N/A N/A datastructures OrderedDict N/A N/A name prop N/A sorted N/A N/A N/A N/A N/A opts model properties iteritems key N/A N/A N/A prop N/A N/A N/A prop N/A 1 creation_counter N/A N/A N/A N/A opts fields N/A name N/A opts fields N/A N/A N/A N/A N/A opts exclude N/A name N/A opts exclude N/A N/A N/A form_field N/A N/A prop get_form_field help_text N/A N/A N/A opts help_texts get name None N/A N/A form_field None N/A N/A N/A model_fields N/A name form_field N/A bad_attr_name N/A ModelFormMetaclass bad_attr_names N/A N/A N/A N/A model_fields has_key bad_attr_name N/A N/A N/A ImproperlyConfigured N/A When you use ModelForm, you can not use these names as field names: %s N/A str N/A ModelFormMetaclass bad_attr_names N/A original_ordered_names N/A N/A model_fields keys N/A N/A N/A model_fields update declared_fields N/A extra_index N/A len original_ordered_names N/A N/A name field N/A N/A model_fields iteritems N/A N/A N/A name original_ordered_names N/A N/A N/A field _position_hint N/A N/A original_ordered_names index name N/A N/A N/A field _position_hint extra_index N/A extra_index 1 N/A N/A attrs N/A _base_fields model_fields N/A props N/A N/A N/A opts model properties N/A N/A name field N/A N/A model_fields iteritems N/A N/A prop N/A N/A props get name N/A prop N/A check_for_property_field N/A N/A form value prop N/A prop N/A N/A N/A property_clean prop value N/A True N/A N/A N/A N/A N/A field validators append check_for_property_field N/A N/A N/A attrs N/A _base_fields declared_fields N/A N/A N/A N/A super ModelFormMetaclass cls __new__ cls class_name bases attrs N/A N/A BaseModelForm N/A N/A forms Form N/A N/A Base class for ModelForm.

  This overrides the forms.BaseForm constructor and adds a save() method.

  This class does not have a special metaclass; the magic metaclass is
  added by the subclass ModelForm.
   __init__ N/A N/A self instance initial N/A None None kwargs N/A N/A Constructor.

    Args (all optional and defaulting to None):
      data: dict of data values, typically from a POST request)
      initial: dict of initial values
      instance: Model instance to be used for additional initial values

    Except for initial and instance, these arguments are passed on to
    the forms.BaseForm constructor unchanged, but only if not None.
    Leave these blank (i.e. None)
     N/A opts N/A self _meta N/A N/A self instance instance N/A object_data N/A N/A N/A instance None N/A N/A N/A name prop N/A N/A N/A N/A instance properties iteritems N/A N/A N/A N/A opts fields N/A name N/A opts fields N/A N/A N/A N/A N/A opts exclude N/A name N/A opts exclude N/A N/A N/A N/A object_data N/A name N/A N/A prop get_value_for_form instance N/A N/A initial None N/A N/A N/A N/A object_data update initial N/A N/A kwargs N/A initial object_data N/A kwargs N/A dict N/A N/A name value N/A N/A name value N/A N/A kwargs iteritems N/A value None N/A N/A N/A N/A super BaseModelForm self __init__ kwargs N/A save N/A N/A self commit N/A True kwargs N/A N/A Save this form's cleaned data into a model instance.

    Args:
      commit: optional bool, default True; if true, the model instance
        is also saved to the datastore.

    Returns:
      A model instance.  If a model instance was already associated
      with this form instance (either passed to the constructor with
      instance=...  or by a previous save() call), that same instance
      is updated and returned; if no instance was associated yet, one
      is created by this call.

    Raises:
      ValueError if the data couldn't be validated.
     N/A N/A N/A self is_valid N/A N/A N/A ValueError Cannot save a non valid form N/A opts N/A self _meta N/A instance N/A self instance N/A N/A instance None N/A N/A fail_message created N/A N/A fail_message updated N/A N/A self errors N/A N/A N/A ValueError N/A The %s could not be %s because the data didn't validate. N/A N/A N/A N/A opts model kind fail_message N/A cleaned_data N/A self data N/A converted_data N/A N/A propiter N/A N/A itertools chain N/A N/A N/A N/A N/A opts model properties iteritems N/A iter N/A N/A key_name N/A StringProperty name key_name N/A N/A name prop propiter N/A N/A N/A N/A cleaned_data has_key name N/A N/A value N/A N/A cleaned_data get name N/A N/A N/A value N/A N/A prop default None N/A N/A value N/A prop default N/A N/A converted_data N/A name N/A N/A prop make_value_from_form value N/A N/A N/A N/A N/A converted_data update kwargs N/A N/A instance None N/A N/A N/A issubclass N/A opts model NamedModel N/A N/A N/A N/A logging debug commit argument ignored. N/A instance N/A N/A N/A opts model create_new_entity converted_data N/A N/A instance N/A N/A opts model converted_data N/A N/A self instance instance N/A N/A N/A name value N/A N/A converted_data iteritems N/A N/A N/A name key_name N/A N/A N/A N/A setattr instance name value N/A N/A N/A N/A db BadValueError N/A err N/A N/A N/A ValueError N/A The %s could not be %s (%s) N/A N/A N/A N/A opts model kind fail_message err N/A commit N/A N/A N/A N/A instance put N/A instance N/A N/A ModelForm N/A BaseModelForm N/A N/A A Django form tied to a Datastore model.

  Note that this particular class just sets the metaclass; all other
  functionality is defined in the base class, BaseModelForm, above.

  Usage example:

    from google.appengine.ext import db
    from google.appengine.ext.db import djangoforms

    # First, define a model class
    class MyModel(db.Model):
      foo = db.StringProperty()
      bar = db.IntegerProperty(required=True, default=42)

    # Now define a form class
    class MyForm(djangoforms.ModelForm):
      class Meta:
        model = MyModel

  You can now instantiate MyForm without arguments to create an
  unbound form, or with data from a POST request to create a bound
  form.  You can also pass a model instance with the instance=...
  keyword argument to create an unbound (!) form whose initial values
  are taken from the instance.  For bound forms, use the save() method
  to return a model instance.

  Like Django's own corresponding ModelForm class, the nested Meta
  class can have two other attributes:

    fields: if present and non-empty, a list of field names to be
            included in the form; properties not listed here are
            excluded from the form

    exclude: if present and non-empty, a list of field names to be
             excluded from the form

  If exclude and fields are both non-empty, names occurring in both
  are excluded (i.e. exclude wins).  By default all property in the
  model have a corresponding form field defined.

  It is also possible to define form fields explicitly.  This gives
  more control over the widget used, constraints, initial value, and
  so on.  Such form fields are not affected by the nested Meta class's
  fields and exclude attributes.

  If you define a form field named 'key_name' it will be treated
  specially and will be used as the value for the key_name parameter
  to the Model constructor. This allows you to create instances with
  named keys. The 'key_name' field will be ignored when updating an
  instance (although it will still be shown on the form).
   N/A __metaclass__ ModelFormMetaclass N/A