diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2013-12-31 21:02:48 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2013-12-31 21:31:06 (GMT) |
commit | 499eb6e121dfe7cef521553eba3f85e9122a6cea (patch) | |
tree | 16ddaf5e024c62cb9dad542976cb4453c9521441 /sugar_network/model/routes.py | |
parent | fc98d378a6726923daa994e0d96efa8ede13073a (diff) |
Use stubs for missed context images; rename context types
Diffstat (limited to 'sugar_network/model/routes.py')
-rw-r--r-- | sugar_network/model/routes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sugar_network/model/routes.py b/sugar_network/model/routes.py index 447ff30..c5c4929 100644 --- a/sugar_network/model/routes.py +++ b/sugar_network/model/routes.py @@ -15,7 +15,7 @@ import logging import mimetypes -from os.path import join, split +from os.path import split from sugar_network import static, db from sugar_network.toolkit.router import route, fallbackroute, Blob, ACL @@ -99,7 +99,7 @@ class FrontRoutes(object): @fallbackroute('GET', ['static']) def get_static(self, request): - path = join(static.PATH, *request.path[1:]) + path = static.path(*request.path[1:]) if not mimetypes.inited: mimetypes.init() mime_type = mimetypes.types_map.get('.' + path.rsplit('.', 1)[-1]) @@ -116,7 +116,7 @@ class FrontRoutes(object): @route('GET', ['favicon.ico']) def favicon(self, request, response): return Blob({ - 'blob': join(static.PATH, 'favicon.ico'), + 'blob': static.path('favicon.ico'), 'mime_type': 'image/x-icon', }) |