Cleaned up bower_storage a bit.
- Legacy-Id: 9952
This commit is contained in:
parent
ec84efedcd
commit
7a059c908a
|
@ -2,8 +2,11 @@ from django.core.files.storage import FileSystemStorage
|
|||
from django.contrib.staticfiles.finders import BaseStorageFinder
|
||||
from django.conf import settings
|
||||
|
||||
if settings.SERVER_MODE != 'production':
|
||||
# We need this during test and development in order to find the external
|
||||
# static files which are managed with bower (using manage.py bower_install)
|
||||
class BowerStorageFinder(BaseStorageFinder):
|
||||
storage = FileSystemStorage(location=settings.STATIC_ROOT, base_url=settings.STATIC_URL)
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
class BowerStorageFinder(BaseStorageFinder):
|
||||
storage = FileSystemStorage(location=settings.COMPONENT_ROOT, base_url=settings.COMPONENT_URL)
|
||||
|
||||
def find(self, path, all=False):
|
||||
files = super(BowerStorageFinder, self).find(path, all)
|
||||
return files
|
||||
|
|
Loading…
Reference in a new issue