Example #1
0
  def POST(self):
    you = auth.require_you()
    record = {'type':'commission','commissioner':you.id, 'created':make_timestamp()}

    try:
      commission_ish(record)
    except ValueError:
      return render("form", action="new", commission=record, you=auth.get_you(), error="Unacceptable Price")
    web.seeother('/')
Example #2
0
 def GET(self, commission_id):
   you = auth.require_you()
   if commission_id not in db:
     raise web.notfound()
   commission = db[commission_id]
   if commission['commissioner'] != you.id and you['openids'] != ["xri://=!E68D.731D.F0A8.BFA8"]:
     raise web.notfound()
   
   #if web.openid.status() == "xri://=!E68D.731D.F0A8.BFA8":
   #  return "awesome powers"
   return render("form", action=commission_id, commission=commission, you=auth.get_you())
Example #3
0
  def GET(self):
    commissions = usernames([row.value for row in database.commissions(db, descending=True)])
    finished = usernames([row.value for row in database.finished(db, descending=True)])
    deleted = usernames([row.value for row in database.deleted(db, descending=True)])

    return render("index", commissions=commissions, finished=finished, deleted=deleted, you=auth.get_you())