awips2/pythonPackages/Werkzeug-0.12.1/examples/webpylike/example.py

31 lines
573 B
Python
Raw Permalink Normal View History

2017-03-14 15:05:59 -05:00
# -*- coding: utf-8 -*-
"""
Example application based on weblikepy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The application from th web.py tutorial.
:copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD.
"""
from webpylike import WebPyApp, View, Response
urls = (
'/', 'index',
'/about', 'about'
)
class index(View):
def GET(self):
return Response('Hello World')
class about(View):
def GET(self):
return Response('This is the about page')
app = WebPyApp(urls, globals())