

def decompress(self, value):
    '\n        Receives an instance of `MultiLingualText` (or a properly-formatted\n        block of XML) and returns a list of values corresponding in position\n        to the current ordering of settings.LANGUAGES.\n        '
    text_dict = {
        
    }
    if value:
        if isinstance(value, datastructures.MultiLingualText):
            text_dict = dict(((code, getattr(value, code)) for (code, verbose) in LANGUAGES))
        else:
            try:
                xml_as_python_object = objectify.fromstring(value)
            except XMLSyntaxError:
                raise Exception(('%s MultiLingualTextFieldWidget.decompress()!' % INVALID_XML_ERROR))
            else:
                text_dict = dict(((unicode(l.code), unicode((l.language_text or ''))) for l in xml_as_python_object.language))
    return [text_dict.get(code, '') for (code, verbose) in LANGUAGES]

dataset/ETHPy150Open WGBH/django-multilingualfield/multilingualfield/widgets.py MultiLingualTextFieldWidget.decompress/original