peterbe / django-static

Template tags for better serving static files from templates in Django
BSD 2-Clause "Simplified" License
193 stars 28 forks source link

Feature request: "slimall" should take a parameter that lets you name this group #4

Closed adamJLev closed 14 years ago

adamJLev commented 14 years ago

First of all, great work!

I have like 20 JS includes in a slimall, and the problem is that this creates a really long filename, e.g.:

/_c/js/ext/jquery.browser_jquery.slidingGallery_jquery.swfobject.1-0-9_jquery.validate_jquery.nyroModal_omniture_prototypes_boot_Tracker_View_UpgradePage_ResetPasswordOverlay_SignInPage_CreditCardPage_DevicesPage_ScreenshotsPage_GetMobileAppPage_init.1274370212.js

and I know such long filenames get blocked by some (stupid) corporate "surf control" type of software. So a solution would be to limit the length of the generated filenames, or allow to pass an argument to slimall, e.g.:

{% slimall "common" %}

and this will create a file called common.xxxxxxxx.js

What do you think? Thx PS- I will probably code this into your code when I have time..

peterbe commented 14 years ago

I'd prefer if it was all automated. Perhaps we just say: if the combined name is longer than X characters concatenate it.

peterbe commented 14 years ago

In fact, this is done now and pushed to github and uploaded on PyPi.

adamJLev commented 14 years ago

Awesome thanks!