You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a feature request/help for implementing a function to automagically bundle all files of a certain type in a directory. I tried writing my own function:
def make_css_bundle(media_root, dir):
files = os.listdir(os.path.join(media_root, dir))
files.sort()
files = [os.path.join(dir, f) for f in files]
return files
but I'm running into errors because the Bundle._build function doesn't support lists (I'm not that great of a programmer, so I gave up). I think this feature is important as it will allow a user to use Pinax css folders without hand-coding each file.
The text was updated successfully, but these errors were encountered:
FWIW, to make your approach work, you'd need to concat everything to a single list, and then use Python's * syntax to pass the list items as individual arguments:
This is just a feature request/help for implementing a function to automagically bundle all files of a certain type in a directory. I tried writing my own function:
and calling it like this:
but I'm running into errors because the Bundle._build function doesn't support lists (I'm not that great of a programmer, so I gave up). I think this feature is important as it will allow a user to use Pinax css folders without hand-coding each file.
The text was updated successfully, but these errors were encountered: