AƱadido fichero gitignore
[webpysample.git] / adminapp.py
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 import web
5 import db
6
7 urls = (
8         '', 'admin.admin.Index',
9         '/view/(?P<id>.*)', 'admin.admin.AdminView',
10        )
11
12 registered = (
13         db.User, 
14         db.Test,
15         )
16
17 app = web.application(urls, globals())
18
19 def registration_hook():
20     web.ctx.registered = registered
21 app.add_processor(web.loadhook(registration_hook))
22
23 if __name__ == '__main__':
24     app.run()