Ignore:
Timestamp:
Dec 20, 2009, 5:26:48 PM (14 years ago)
Author:
broder
Message:

Setup hosting for static resources in the InvirtWeb? and
InvirtUnauthWeb? classes, instead of in the fcgi configuration.

File:
1 edited

Legend:

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

    r2648 r2652  
    99import datetime
    1010import hmac
     11import os
    1112import random
    1213import sha
     
    4344import ajaxterm
    4445
     46
     47static_dir = os.path.join(os.path.dirname(__file__), 'static')
     48InvirtStatic = cherrypy.tools.staticdir.handler(
     49    root=static_dir,
     50    dir=static_dir,
     51    section='/static')
     52
    4553class InvirtUnauthWeb(View):
     54    static = InvirtStatic
     55
    4656    @cherrypy.expose
    4757    @cherrypy.tools.mako(filename="/unauth.mako")
     
    5868                                                 'from invirt import database']
    5969        self._cp_config['request.error_response'] = self.handle_error
     70
     71    static = InvirtStatic
    6072
    6173    @cherrypy.expose
Note: See TracChangeset for help on using the changeset viewer.