The Android Open Source Project | 52d4c30 | 2009-03-03 19:29:09 -0800 | [diff] [blame^] | 1 | #!/usr/bin/python2.5 |
| 2 | # |
| 3 | # Copyright (C) 2008 The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | |
| 18 | """Serve static pages for the pdk on appengine |
| 19 | """ |
| 20 | |
| 21 | import os |
| 22 | |
| 23 | from google.appengine.ext import webapp |
| 24 | from google.appengine.ext.webapp.util import run_wsgi_app |
| 25 | |
| 26 | |
| 27 | class MainPage(webapp.RequestHandler): |
| 28 | def get(self): |
| 29 | self.redirect('docs/index.html') |
| 30 | |
| 31 | application = webapp.WSGIApplication( |
| 32 | [('/', MainPage)], |
| 33 | debug=True) |
| 34 | |
| 35 | def main(): |
| 36 | run_wsgi_app(application) |
| 37 | |
| 38 | if __name__ == "__main__": |
| 39 | main() |
| 40 | |
| 41 | # To upload this application: |
| 42 | # /home/build/static/projects/apphosting/devtools/appcfg.py update pdk/ |
| 43 | # where the pdk directory contains: pdk.py, app.yaml, and the docs directory. |
| 44 | # where the docs are made from the Pdk.mk file. |