def slugify_filename(filename): t = filename.split('.') name = slugify("".join(t[:-1])) ext = slugify(t[-1]) filename = ".".join((name, ext,)) return filename
def dress_image_folder(self, filename): t = filename.split('.') ext = slugify(t[-1]) filename = ".".join((slugify(unicode(self.brand) + self.dress_id), ext,)) return os.path.join('uploads', 'clothes', filename)
def border_image_folder(self, filename): return os.path.join('uploads', 'brand', 'border', \ slugify(self.name), slugify_filename(filename))