bugfix for book infobox
[wolnelektury.git] / apps / compress / utils.py
index 1e0681f..89b04a5 100644 (file)
@@ -58,10 +58,10 @@ def media_root(filename):
     """
     Return the full path to ``filename``. ``filename`` is a relative path name in MEDIA_ROOT
     """
-    return os.path.join(django_settings.MEDIA_ROOT, filename)
+    return os.path.join(django_settings.STATIC_ROOT, filename)
 
 def media_url(url):
-    return django_settings.MEDIA_URL + urlquote(url)
+    return django_settings.STATIC_URL + urlquote(url)
 
 def concat(filenames, separator=''):
     """
@@ -97,7 +97,7 @@ def get_version(version):
     except ValueError:
         return str(version)
 
-def remove_files(path, filename, verbosity=0):    
+def remove_files(path, filename, verbosity=0):
     regex = re.compile(r'^%s$' % (os.path.basename(get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'\d+'))))
 
     for f in os.listdir(path):