Search code examples
pythonpylonsminifyhelper

Pylons webhelpers minify file name too long


I'm using the pylons "minify" webhelper to minify and combine all of my javascript/css files. It seems the helper concatenates all of the file names and uses the result as the name for the combined version. I have a lot of JavaScript files that are being combined and the resulting file name is giving the error:

IOError: [Errno 63] File name too long

Is there any way to manually specify the file name or shorten it without changing the helper code?


Solution

  • Basicaly MinificationWebHelpers adds following options to the WebHelpers javascript_link and stylesheet_link functions:

    • minified (bool): Minifies/reduces as much as possible each of the files passed to it’s minimum size to reduce page load times.
    • combined (bool): Joins all files passed into a single one to reduce server requests which in turn reduces page load times.
    • beaker_kwargs (dict): override default arguments that will be passed to beaker_cache.
    • combined_filename (string): Name of the filename that will be used in conjunction with combined=True

    So it looks like you can set combined_filename to whatever you want the name to be