Ignore:
Timestamp:
Dec 20, 2009, 9:48:10 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-rebased/code/main.py

    r2726 r2730  
    77import datetime
    88import hmac
     9import os
    910import random
    1011import sha
     
    3839from view import View, revertStandardError
    3940
     41
     42static_dir = os.path.join(os.path.dirname(__file__), 'static')
     43InvirtStatic = cherrypy.tools.staticdir.handler(
     44    root=static_dir,
     45    dir=static_dir,
     46    section='/static')
     47
    4048class InvirtUnauthWeb(View):
     49    static = InvirtStatic
     50
    4151    @cherrypy.expose
    4252    @cherrypy.tools.mako(filename="/unauth.mako")
     
    5363                                                 'from invirt import database']
    5464        self._cp_config['request.error_response'] = self.handle_error
     65
     66    static = InvirtStatic
    5567
    5668    @cherrypy.expose
Note: See TracChangeset for help on using the changeset viewer.