Package wtf :: Package app :: Package services :: Module static :: Class GlobalStatic
[hide private]
[frames] | no frames]

Class GlobalStatic

source code

object --+
         |
        GlobalStatic

Actual global service object for static delivery
Instance Methods [hide private]
 
__init__(self, svc)
Initialization
source code
callable
controller(self, resource, group=None)
Factory for a simple static file delivery controller
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, svc)
(Constructor)

source code 
Initialization
Overrides: object.__init__

controller(self, resource, group=None)

source code 

Factory for a simple static file delivery controller

If group is set and not None, the controller assumes to be attached to a dynamic map and grabs request.match.group(group) as the (relative) filename to deliver. If it's None, the filename resulting from request.url is used.

Parameters:
  • resource (str) - Resource token configured for the base directory/directories of the delivered files. The directories are tried in order.
  • group (unicode or int) - Regex group
Returns: callable
Delivery controller