﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15320	staticfiles allows change of storage backend on collection but not when searching for files	imbaczek@…		"the culprits are:

finders.py:
{{{
64	        for prefix, root in self.locations:
65	            filesystem_storage = FileSystemStorage(location=root)
}}}

i need the FileSystemFinder to think that some files are always modified (i want to use them as overrides for a simple skin system.)


here's the storage i'm want to use (in django 1.2 and backported staticfiles, but everything is still applicaple):

{{{#!python
import os.path
from datetime import datetime

from django.conf import settings

from staticfiles.storage import StaticFileStorage


class SkinAwareStorage(StaticFileStorage):
    def __init__(self, *args, **kwargs):
        super(SkinAwareStorage, self).__init__(*args, **kwargs)


    def modified_time(self, name):
        '''Always return current time for non-default skins'''
        p = self.path(name)
        if p.startswith(os.path.join(settings.STATIC_ROOT, 'skins')) \
                and not p.startswith(os.path.join(settings.STATIC_ROOT, 'skins', 'default')):
            return datetime.now()
        else:
            return super(SkinAwareStorage, self).modified_time(name)
}}}

my suggestion: a STATICFILES_FINDER_STORAGE settings parameter."		closed	contrib.staticfiles	1.2		wontfix			Unreviewed	0	0	0	0	0	0
