think about something like this:

class myClass(db.model):
  myProperty = db.StringProperty()
  def __init__(self, myProperty=None, **kwargs):
    if myProperty is None:
        myProperty = something cool
    super(myClass, self).__init__(myProperty=myProperty, **kwargs)

since what you are doing is replacing the db.model constructor, not
actually calling it anywhere

On Sat, Apr 10, 2010 at 12:10, Kelly A <[email protected]> wrote:
> As I understand it you cannot use python constructors when creating an
> object that inherits from db.model, so this would not work:
>
> class myClass(db.model):
>  myProperty = db.StringProperty()
>  def __init__(self):
>     tempProperty = something complex.
>     myProperty = tempProperty
>
>
> Is the best way to do processing on the creation of objects based on
> db.model to create factories that generate the objects then?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to