* Feature #678: Drop custom delimiters in tags : I declare a constant in the begining of text.py file.
allow_registration = boolean(default=True)
# tag parsing
-tags_delimiter = string(default=",")
tags_max_length = integer(default=50)
# Whether comments are ascending or descending
host_whitelist=(),
whitelist_tags=set([]))
+TAGS_DELIMITER=',';
def clean_html(html):
# clean_html barfs on an empty string
# Split the tag string into a list of tags
for tag in stripped_tag_string.split(
- mg_globals.app_config['tags_delimiter']):
+ TAGS_DELIMITER):
# Ignore empty or duplicate tags
if tag.strip() and tag.strip() not in [t['name'] for t in taglist]:
"""
media_tag_string = ''
if media_entry_tags:
- media_tag_string = mg_globals.app_config['tags_delimiter'].join(
+ media_tag_string = (TAGS_DELIMITER+u' ').join(
[tag['name'] for tag in media_entry_tags])
return media_tag_string