def get_available_name(self, name, max_length=None):
if max_length and len(name) + 41 > max_length:
raise SuspiciousFileOperation(
'Storage can not find an available filename for "%s". '
'Please make sure that the corresponding file field '
'allows sufficient "max_length".' % name
)
return name
评论列表
文章目录