File: example.py

package info (click to toggle)
python-werkzeug 1.0.1%2Bdfsg1-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,888 kB
  • sloc: python: 21,897; javascript: 173; makefile: 36; xml: 16
file content (29 lines) | stat: -rw-r--r-- 559 bytes parent folder | download
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
# -*- coding: utf-8 -*-
"""
    Example application based on weblikepy
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    The application from th web.py tutorial.

    :copyright: 2007 Pallets
    :license: BSD-3-Clause
"""
from .webpylike import Response
from .webpylike import View
from .webpylike import WebPyApp


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())