forked from sydney-linux-user-group/slug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler-admin.py
38 lines (29 loc) · 871 Bytes
/
handler-admin.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
#!/usr/bin/python
#
# -*- coding: utf-8 -*-
# vim: set ts=4 sw=4 et sts=4 ai:
"""Default handler for admin pages."""
import os
import config
config.setup(os.environ.get('HTTP_HOST', None))
# AppEngine imports
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
# OpenID middleware
import aeoid.middleware
# Import the actual handlers
import event_edit
import event_publish
application = webapp.WSGIApplication(
[('/event/add', event_edit.EditEvent),
('/event/(.*)/edit', event_edit.EditEvent),
('/event/(.*)/addoffer', event_edit.AddOffer),
('/event/(.*)/remoffer', event_edit.RemOffer),
('/event/(.*)/publish', event_publish.PublishEvent),
('/event/(.*)/email', event_publish.SendEmailAboutEvent),
],
debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()