From 750ce41f217cd7b638ad5b69fcb9df1b49841b58 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 17 Sep 2009 19:58:01 +0000 Subject: - Add a ``repoze.bfg.url.static_url`` API which is capable of generating URLs to static resources defined by the ```` ZCML directive. See the "Views" narrative chapter's section titled "Generating Static Resource URLs" for more information. --- repoze/bfg/static.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'repoze/bfg/static.py') diff --git a/repoze/bfg/static.py b/repoze/bfg/static.py index 01ce98a30..ef893875f 100644 --- a/repoze/bfg/static.py +++ b/repoze/bfg/static.py @@ -76,3 +76,10 @@ class PackageURLParser(StaticURLParser): return '<%s %s:%s at %s>' % (self.__class__.__name__, self.package_name, self.root_resource, id(self)) +class StaticRootFactory: + def __init__(self, spec): + self.spec = spec + + def __call__(self, environ): + return self + -- cgit v1.2.3