예제 #1
0
    def output_filename(self, filename, version):
        replacement = version
        if not replacement:
            replacement = settings.COMPRESS_VERSION_DEFAULT

        output_filename = filename.replace(self.placeholder(), replacement)
        return os.path.normpath(root_path(output_filename))
예제 #2
0
 def need_update(self, output_file, paths):
     version = self.version(paths)
     output_file = self.output_filename(output_file, version)
     if not storage.exists(root_path(output_file)):
         return True, version
     return self.version_impl.need_update(output_file, paths, version)