def trans_content_type(content_type): try: content_type = int(content_type) except: pass return smart_unicode(NOVEL_CONTENT_TYPES.get(content_type, "其他"))
def url_quote(value): return smart_unicode(urllib.quote(smart_str(value)))