# tag parsing
tags_delimiter = string(default=",")
-tags_case_sensitive = boolean(default=False)
tags_max_length = integer(default=50)
# By default not set, but you might want something like:
# Ignore empty or duplicate tags
if tag.strip() and tag.strip() not in [t['name'] for t in taglist]:
- if mg_globals.app_config['tags_case_sensitive']:
- taglist.append({'name': tag.strip(),
- 'slug': slugify(tag.strip())})
- else:
- taglist.append({'name': tag.strip().lower(),
- 'slug': slugify(tag.strip().lower())})
+ taglist.append({'name': tag.strip(),
+ 'slug': slugify(tag.strip())})
return taglist