Hi, I'm a newbie here, both python and app engine. a few questions:
 I store some fields in DB, but when show message on Web, I need more
fields, most of them are calculated according to fields in DB, For now
I don't want to do the calculating on web, but when I add some fields
to the DB model class, the web dose not recognize them, all values are
None, what should I do?

For example, I have a class
class Event(db.Model) :
        owner = db.UserProperty()
        title = db.StringProperty()
        content = db.StringProperty(multiline = True)
        status = None
        color = None

when showing events on web, I want 'color' and 'status', so after
retrieve the data from DB, I do the following:

                for event in events :
                        logger.info(event.status)
                        logger.info(event.color);
                        event.create_time = datetime.now()
                        event.status = "Finished"
                        event.color = "green"

but on web, they are still None.

BTW: I have to add status and color in class, or these fields are not
recognized.

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

Reply via email to