git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cloud plugin style
[myslice.git]
/
unfold
/
collectstatic.py
diff --git
a/unfold/collectstatic.py
b/unfold/collectstatic.py
index
4fb3bbc
..
a3da52a
100644
(file)
--- a/
unfold/collectstatic.py
+++ b/
unfold/collectstatic.py
@@
-1,3
+1,5
@@
+from __future__ import print_function
+
import os
from django.conf import settings
from django.utils.datastructures import SortedDict
import os
from django.conf import settings
from django.utils.datastructures import SortedDict
@@
-39,6
+41,7
@@
class PluginFinder(FileSystemFinder):
return [os.path.join(dir, name, 'static') for name in os.listdir(dir)
if os.path.isdir(os.path.join(dir, name))]
return [os.path.join(dir, name, 'static') for name in os.listdir(dir)
if os.path.isdir(os.path.join(dir, name))]
+# as these are a django-specific notion
class ThirdPartyFinder(BaseFinder):
"""
A static files finder that looks in the directory of each third-party
class ThirdPartyFinder(BaseFinder):
"""
A static files finder that looks in the directory of each third-party
@@
-47,10
+50,12
@@
class ThirdPartyFinder(BaseFinder):
# third-party/MODULE/path/to/js
extensions = {
# PREFIX : EXTENSIONS
# third-party/MODULE/path/to/js
extensions = {
# PREFIX : EXTENSIONS
- '' : ('.html',),
- 'js' : ('.js',),
+# third party stuff is not expected to provide templates,
+# '' : ('.html',),
+ 'js' : ('.js','.map',),
'css': ('.css',),
'img': ('.png', '.ico',),
'css': ('.css',),
'img': ('.png', '.ico',),
+ 'fonts' : ('.svg', '.eot', '.ttf', '.woff'),
}
def find(self, search_path, all=False):
}
def find(self, search_path, all=False):
@@
-76,6
+81,7
@@
class ThirdPartyFinder(BaseFinder):
matched_path = os.path.join(path, file)
if not all:
return matched_path
matched_path = os.path.join(path, file)
if not all:
return matched_path
+ print('ThirdPartyFinder, adding',matched_path)
matches.append(matched_path)
return matches
matches.append(matched_path)
return matches