1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import os
def bundle_builder(bundle_name, folder, **kwargs):
class file_map(object):
def __init__(self, root):
self.root = os.path.relpath(root, STATIC_ROOT)
def __call__(self, file_name, **kwargs):
if file_name not in kwargs.get('exclude', []):
return "%s/%s" % (self.root, file_name)
file_list = [bundle_name,]
for root, dirs, files in os.walk(os.path.join(STATIC_ROOT, folder)):
file_list.extend(map(file_map(root), files))
return tuple(file_list)
|
More like this
- Coffeescript compilation by delfick 3 months, 3 weeks ago
- Template tag to clear cached template fragment by joao.coelho 3 years, 6 months ago
- staticview for app by limodou 5 years, 11 months ago
- YUI Autocomplete by pigletto 5 years, 8 months ago
- Clear Django Cache by girasquid 4 years, 7 months ago
Comments