App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.ext.db.djangoforms.BaseModelForm Class Reference
Inheritance diagram for google.appengine.ext.db.djangoforms.BaseModelForm:
google.appengine.ext.db.djangoforms.ModelForm

Public Member Functions

def __init__
 
def save
 

Public Attributes

 instance
 

Detailed Description

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.

Constructor & Destructor Documentation

def google.appengine.ext.db.djangoforms.BaseModelForm.__init__ (   self,
  data = None,
  files = None,
  auto_id = None,
  prefix = None,
  initial = None,
  error_class = None,
  label_suffix = None,
  instance = None 
)
Constructor.

Args (all optional and defaulting to None):
  data: dict of data values, typically from a POST request)
  files: dict of file upload values; Django 0.97 or later only
  auto_id, prefix: see Django documentation
  initial: dict of initial values
  error_class, label_suffix: see Django 0.97 or later documentation
  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.
Some arguments (files, error_class, label_suffix) are only
supported by Django 0.97 or later.  Leave these blank (i.e. None)
when using Django 0.96.  Their default values will be used with
Django 0.97 or later even when they are explicitly set to None.

Member Function Documentation

def google.appengine.ext.db.djangoforms.BaseModelForm.save (   self,
  commit = True 
)
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.

The documentation for this class was generated from the following file: