File: hello.py

package info (click to toggle)
pylons 1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,700 kB
  • sloc: python: 3,991; makefile: 38
file content (17 lines) | stat: -rw-r--r-- 429 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import logging

from pylons import request, response, session, tmpl_context as c, url
from pylons.controllers import WSGIController
from pylons.controllers.util import abort, redirect

log = logging.getLogger(__name__)

class HelloController(WSGIController):
    def __init__(self):
        self._pylons_log_debug = True

    def index(self):
        return 'Hello World'
    
    def oops(self):
        raise Exception('oops')