static asset management, thanks Niphlod

This commit is contained in:
mdipierro
2012-09-28 17:06:11 -05:00
parent bd27df8fa5
commit e18f38d4da
4 changed files with 47 additions and 46 deletions
+2 -5
View File
@@ -274,6 +274,8 @@ class Response(Storage):
for item in files:
if isinstance(item,str):
f = item.lower().split('?')[0]
if self.static_version:
item = item.replace('/static/', '/static/_%s/' % self.static_version, 1)
if f.endswith('.css'): s += css_template % item
elif f.endswith('.js'): s += js_template % item
elif f.endswith('.coffee'): s += coffee_template % item
@@ -714,8 +716,3 @@ class Session(Storage):
del response.session_file
except:
pass