#15320: staticfiles allows change of storage backend on collection but not when
searching for files
------------------------------------------------------+---------------------
               Reporter:  imbaczek@…                  |         Owner:     
                 Status:  closed                      |     Milestone:  1.3
              Component:  django.contrib.staticfiles  |       Version:  1.2
             Resolution:  wontfix                     |      Keywords:     
           Triage Stage:  Unreviewed                  |     Has patch:  0  
    Needs documentation:  0                           |   Needs tests:  0  
Patch needs improvement:  0                           |  
------------------------------------------------------+---------------------
Changes (by jezdez):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => wontfix
  * needs_tests:  => 0
  * needs_docs:  => 0


Comment:

 This seems like an edge case to me (hence closing), but for the record
 that's pretty easy to do already:

 {{{
 class SkinAwareFinder(FileSystemFinder):
     def __init__(self, *args, **kwargs):
         super(SkinAwareFinder, self).__init__(*args, **kwargs)
         for prefix, root in self.locations:
             skinaware_storage = SkinAwareStorage(location=root)
             skinaware_storage.prefix = prefix
             self.storages[root] = skinaware_storage
 }}}

 Also, you probably don't want your `SkinAwareStorage ` class to subclass
 `StaticFileStorage` but simply `FileSystemStorage` since that's only used
 for the collection.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15320#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to