Skip to content

Instantly share code, notes, and snippets.

Created December 4, 2010 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/728218 to your computer and use it in GitHub Desktop.
Save anonymous/728218 to your computer and use it in GitHub Desktop.
class kcb(db.Model):
owner = db.UserProperty()
name = db.StringProperty(multiline=True)
time = db.StringProperty(multiline=True)
week = db.ListProperty(long)
place = db.StringProperty(multiline=True)
date = db.DateTimeProperty(auto_now_add=True)
KCBs = db.GqlQuery("SELECT * FROM kcb ORDER BY date DESC LIMIT 1000")
for KCB in KCBs:
#####下面这句#########
if NowDay==KCB.time[0] and NowTime==KCB.time[-1] and NowWeek in KCB.week:
self.response.out.write('<blockquote>%s</blockquote>' %KCB.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment