-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcam_mash_app.py
49 lines (38 loc) · 1.13 KB
/
cam_mash_app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import web
from models import *
# from ChatUser import ChatUser
urls = (
'/', 'index',
'/listen', 'listen',
'/call', 'call',
)
def render_template(name, *args, **kw):
#TODO: find better way to embed templates by name
return getattr(web.template.render("templates", globals={"render_template": render_template}),name)()
render = web.template.render("templates", base='base', globals={"render_template": render_template})
class index:
def GET(self):
# user = users.get_current_user()
return render.index()
def POST(self):
i = web.input()
# person = Person()
# person.name = i.name
# person.put()
return web.seeother('/list')
class listen:
def GET(self):
return render.listen()
# def POST(self):
# return render.listen()
class call:
def GET(self):
return render.call()
#
# class list:
# def GET(self):
# # people = db.GqlQuery("SELECT * FROM Person ORDER BY created DESC LIMIT 10")
# return render.list(people)
app = web.application(urls, globals())
# main = app.cgirun()
if __name__ == "__main__": app.run()