Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #715 (closed enhancement: invalid)

Opened 13 years ago

Last modified 10 years ago

Static file and static directory objects

Reported by: kevin Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version: 0.9a6
Severity: normal Keywords:
Cc:

Description

As a forward-looking alternative to the config file static file handling, we should add StaticFile? and StaticDirectory? objects. Paste may have some code we can use for this.

Change History

comment:1 Changed 13 years ago by max

I'd like to try to help if given some guidelines on what's expected.

comment:2 Changed 13 years ago by max

  • Status changed from new to assigned
  • Owner changed from anonymous to max

Main question is how to integrate new functionality in TG. E.g. how to serve "/favicon.ico"?

comment:3 Changed 13 years ago by anonymous

  • Status changed from assigned to new
  • Owner changed from max to anonymous

I'm afraid I cannot deal with this in a meantime.

comment:4 Changed 13 years ago by jorge.vargas

  • Milestone changed from 0.9 to __future__

comment:5 Changed 12 years ago by fumanchu@…

Is this met by CherryPy 3's tool.handler syntax?

import os
absDir = os.path.join(os.getcwd(), os.path.dirname(__file__))
from cherrypy import tools

class Root:
    nav = tools.staticdir.handler(section="/nav", dir="nav", root=absDir)

comment:6 Changed 11 years ago by Chris Arndt

  • Status changed from new to closed
  • Resolution set to invalid

If I understand the request correctly, this is handled by CherryPy?'s stytic filter.

comment:7 Changed 10 years ago by anonymous

  • Milestone __future__ deleted

Milestone future deleted

Note: See TracTickets for help on using tickets.