We wanted our filenames to use something other than the timestamp.
Made filename generator configurable through settings
Can you please change this to a getattr instead of the big try:except block. Reason being is that something else might raise an AttributeError by mistake and it gets confused with the AttributeError of fetching settings.DJANGO_STATIC_FILENAME_GENERATOR.
Please replace the try:except with:
filename_generator = getattr(settings, 'DJANGO_STATIC_FILENAME_GENERATOR', None)
def default_filename_generator(apart, new_m_time):
"default" is better than "old" because that's what it is. It's only "old" to you :)
I can't merge this until you provide a unit test that checks it. If you need help writing one I'm more than happy to help out. Let me know.
By the way, I forgot to say; I love the idea!
Also, it would really help me accept this if you add a note in the README about being able to set DJANGO_STATIC_FILENAME_GENERATOR
Swapped to getattr instead of try/except
I'm a bit lost on how to write a test for this - can you help me out with that?
Sorry for late reply. Been busy. I'll try to see if I can send a pull request your way towards this when I find time. My september is being butchered by lots of other commitments.