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))
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)