def parse_choices(text, with_blank=True, blank_string="----------"):
    """ Parses structured text into a list of tuples for use by CharField choices.

    :param text: A list of CharField choices structured one choice per line as key|value
    :return: A list of tuples
    """
    if text is None:
        return None

    choices = []

    if with_blank:
        choices.append((None, blank_string))

    choice_strings = text.split("\n")
    for choice_string in choice_strings:
        if choice_string:  # Ignore empty lines
            parts = choice_string.split("|")
            choices.append((parts[0].strip(), parts[1].strip()))

    return choices