def quote_to_dict(quote):
    """Transform the quote document from the way it is stored in our db to a
    form whose parts can be easily rendered.
    """
    citation = '~ ' + ', '.join([name.title() for name in quote['authors']])
    if quote['context']:
        citation += ', ' + quote['context']

    return {
        'text': quote['text'],
        'citation': citation
    }