Ticket #247 (closed enhancement: fixed)
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
Change History
Note: See
TracTickets for help on using
tickets.



