def slugify(value):
"""Coerce a value to a slug."""
if value is None:
raise vol.Invalid('Slug should not be None')
slg = util_slugify(str(value))
if len(slg) > 0:
return slg
raise vol.Invalid('Unable to slugify {}'.format(value))
评论列表
文章目录