comparison piecrust/data/assetor.py @ 290:9f3fc17e71e1

data: Temporary hack for asset URLs.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 05 Mar 2015 01:11:43 -0800
parents 0445a2232de7
children 422052d2e978
comparison
equal deleted inserted replaced
289:9b75b49a4084 290:9f3fc17e71e1
24 base_url = multi_replace( 24 base_url = multi_replace(
25 base_url_format, 25 base_url_format,
26 { 26 {
27 '%path%': rel_assets_path, 27 '%path%': rel_assets_path,
28 '%uri%': uri}) 28 '%uri%': uri})
29 return base_url.rstrip('/') + '/' 29 # TEMP HACK
30 # TODO: looks like we can get here with differently formatted URLs... :(
31 return app.config.get('site/root') + base_url.strip('/') + '/'
30 32
31 33
32 class Assetor(object): 34 class Assetor(object):
33 ASSET_DIR_SUFFIX = '-assets' 35 ASSET_DIR_SUFFIX = '-assets'
34 36