Esempio n. 1
0
 def relative_path(self, absolute_path, output_filename):
     """Rewrite paths relative to the output stylesheet path"""
     absolute_path = posixpath.join(settings.PIPELINE_ROOT, absolute_path)
     output_path = posixpath.join(
         settings.PIPELINE_ROOT,
         posixpath.dirname(output_filename.replace('\\', '/')))  # hotdogee
     return relpath(absolute_path, output_path)
Esempio n. 2
0
 def relative_path(self, absolute_path, output_filename):
     """Rewrite paths relative to the output stylesheet path"""
     absolute_path = posixpath.join(settings.PIPELINE_ROOT, absolute_path)
     output_path = posixpath.join(settings.PIPELINE_ROOT, posixpath.dirname(output_filename))
     return relpath(absolute_path, output_path)
Esempio n. 3
0
 def relative_path(self, absolute_path, output_filename):
     """Rewrite paths relative to the output stylesheet path"""
     absolute_path = os.path.join(settings.PIPELINE_ROOT, absolute_path)
     output_path = os.path.join(settings.PIPELINE_ROOT, os.path.dirname(output_filename))
     return relpath(absolute_path, output_path)
Esempio n. 4
0
 def relative_path(self, absolute_path):
     """Rewrite paths relative to the output stylesheet path"""
     absolute_path = self.absolute_path(absolute_path,
                                        settings.PIPELINE_ROOT)
     return os.path.join(os.sep,
                         relpath(absolute_path, settings.PIPELINE_ROOT))
Esempio n. 5
0
 def relative_path(self, absolute_path):
     """Rewrite paths relative to the output stylesheet path"""
     absolute_path = self.absolute_path(absolute_path, settings.PIPELINE_ROOT)
     return os.path.join(os.sep, relpath(absolute_path, settings.PIPELINE_ROOT))
Esempio n. 6
0
 def relative_url(self, absolute_path):
     """Rewrite paths relative to the output stylesheet path"""
     absolute_path = self.absolute_path(absolute_path, settings.PIPELINE_ROOT)
     relative_url = os.path.join(os.sep, relpath(absolute_path, settings.PIPELINE_ROOT))
     return relative_url if os.sep=='/' else relative_url.replace(os.sep, '/')