Re-added support for folder with static files, refactored static file sending

This commit is contained in:
Armin Ronacher 2010-07-05 10:23:35 +02:00
parent b7109865a3
commit ac13deff40
6 changed files with 36 additions and 10 deletions

View file

@ -29,7 +29,7 @@ def _register_module(module, static_path):
path = state.app.static_path
if state.url_prefix:
path = state.url_prefix + path
state.app.add_url_rule(path + '/<filename>',
state.app.add_url_rule(path + '/<path:filename>',
'%s.static' % module.name,
view_func=module.send_static_file)
return _register