Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1121

Show
Ignore:
Timestamp:
06/05/06 00:41:24
Author:
fumanchu
Message:

Reinstated default favicon (when an app is mounted at webserver root).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cptree.py

    r1111 r1121  
    4747        app = Application(root, script_name, conf) 
    4848        self.apps[script_name] = app 
     49         
     50        # If mounted at "", add favicon.ico 
     51        if script_name == "" and root and not hasattr(root, "favicon_ico"): 
     52            import os 
     53            from cherrypy import tools 
     54            favicon = os.path.join(os.getcwd(), os.path.dirname(__file__), 
     55                                   "favicon.ico") 
     56            root.favicon_ico = tools.staticfile.handler(favicon) 
     57         
    4958        return app 
    5059     

Hosted by WebFaction

Log in as guest/cpguest to create tickets