Permalink
Browse files

Make CSS asset finder configurable with a settings string of STATIC_M…

…ANAGEMENT_CSS_ASSET_PATTERN
  • Loading branch information...
1 parent 73b2f09 commit 248701c3c32edba3451d19fac201d27a4ec726c1 @bradwright committed Apr 27, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 management/commands/static_combine.py
@@ -8,8 +8,10 @@
from static_management.lib import static_combine, get_version, write_versions
-# TODO: Use user-supplied pattern?
-CSS_ASSET_PATTERN = re.compile('(url\(((.*?)\.([a-z]{3,4}))\))')
+try:
+ CSS_ASSET_PATTERN = re.compile(settings.STATIC_MANAGEMENT_CSS_ASSET_PATTERN)
+except AttributeError:
+ CSS_ASSET_PATTERN = re.compile('(url\(((.*?)\.([a-z]{3,4}))\))')
def relpath(path, start):
"""This only works on POSIX systems and is ripped out of Python 2.6 posixpath.py"""

0 comments on commit 248701c

Please sign in to comment.