Ignore:
Timestamp:
Dec 20, 2009, 9:43:55 PM (15 years ago)
Author:
broder
Message:

Connect to the database on init

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy-rebased/code/main.py

    r2663 r2664  
    1616import cherrypy
    1717from StringIO import StringIO
    18 from view import View
    19 
    20 class InvirtWeb(View):
    21     @cherrypy.expose
    22     def helloworld(self):
    23         return "Hello world!"
    24 
    2518def revertStandardError():
    2619    """Move stderr to stdout, and return the contents of the old stderr."""
     
    5245from invirt.config import structs as config
    5346from invirt.common import InvalidInput, CodeError
     47
     48from view import View
     49
     50class InvirtWeb(View):
     51    def __init__(self):
     52        super(self.__class__,self).__init__()
     53        connect()
     54
     55    @cherrypy.expose
     56    def helloworld(self):
     57        return "Hello world!"
    5458
    5559def pathSplit(path):
Note: See TracChangeset for help on using the changeset viewer.