Пример #1
0
def slugify_filename(filename):
    t = filename.split('.')
    name = slugify("".join(t[:-1]))
    ext = slugify(t[-1])
    filename = ".".join((name, ext,))
    return filename
Пример #2
0
 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)
Пример #3
0
 def border_image_folder(self, filename):
     return os.path.join('uploads', 'brand', 'border', \
         slugify(self.name), slugify_filename(filename))