Example #1
0
 def render_option(self, selected_choices, option_value, option_label):
     if option_value:
         option_value = charid.from_int(option_value)
     return super(CharIdSelect, self).render_option(selected_choices, option_value, option_label)
Example #2
0
def to_charid(value):
    if value is None:
        return ''
    if not isinstance(value, long):
        value = long(value)
    return charid.from_int(value)