Hi,
  I think this is because you're trying to delete a property included
on the schema.  The following should demonstrate this:

    class Test(db.Expando):
      first_name = db.StringProperty()

    t = Test(first_name='Jim')
    t.last_name = 'smith'

    del t.last_name  # ok
    del t.first_name  # boom



Robert







On Thu, Jul 28, 2011 at 23:10, J.T <[email protected]> wrote:
> Hi,
>
> from google.appengine.ext     import db
> class Person(db.Expando):
>   first_name = db.StringProperty()
>   last_name = db.StringProperty()
>   hobbies = db.StringListProperty()
>
> p = Person(first_name="Albert", last_name="Johnson")
> p.hobbies = ["chess", "travel"]
>
> del p.first_name
>
>
>
> Traceback (most recent call last):
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/admin/__init__.py",
> line 247, in post
>     exec(compiled_code, globals())
>   File "<string>", line 6, in <module>
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
> line 1831, in __delattr__
>     object.__delattr__(self, key)
> AttributeError: __delete__
>
>
> This script is from
> https://code.google.com/intl/en/appengine/docs/python/datastore/datamodeling.html#The_Expando_Class
> and test it in interactive console.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/M7dzwQCaCPMJ.
> 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