Changeset 2390


Ignore:
Timestamp:
Aug 9, 2009, 6:45:22 PM (15 years ago)
Author:
quentin
Message:

Connect to the database on init

File:
1 edited

Legend:

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

    r2389 r2390  
    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.