Ticket #247 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Create an adapter module for google.appengine.ext.db so that Model classes can be serialised easily

Reported by: nick Owned by: feisley
Priority: major Milestone: 0.3
Component: Encoder Version: 0.3
Keywords: review Cc:
Fixed in revision: Branch:
Author:

Description (last modified by nick) (diff)

Take the example:

from google.appengine.ext import db

class Snapshot(db.Model):
    taken = db.DateTimeProperty(auto_add_now=True)
    image = db.BlobProperty()
    name = db.StringProperty(required=True)

snap = Snapshot(name='bla')
snap.image = 'some image data'

when encoding an instance of Snapshot the attributes boil down to:

{'_name': 'bla', '_image': 'some image data', '_taken': datetime.datetime}

plus a few internal attributes that shouldn't be encoded.

An adapter module should be created so that instances of db.Model report the correct attributes, depending on the class definition.

Attachments

app.py Download (496 bytes) - added by nick 2 years ago.
app.yaml Download (97 bytes) - added by nick 2 years ago.

Change History

Changed 2 years ago by nick

  • status changed from new to accepted
  • description modified (diff)

previewing always helps ...

Changed 2 years ago by nick

Changed 2 years ago by nick

Changed 2 years ago by nick

  • keywords review added
  • owner changed from nick to feisley
  • status changed from accepted to assigned

See  Model Class API for more info.

Changed 2 years ago by nick

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r1202.

Note: See TracTickets for help on using tickets.