def render(self, name, value, attrs):
        if hasattr(self, 'initial'):
            value = self.initial

        final_attrs = self.build_attrs(attrs)
        self.html_id = final_attrs.pop('id', name)

        if not isinstance(value, list):
            value = self.decompress(value)

        # Querying objects
        language, storagefile = None, None
        if value:
            try:
                language = Language.objects.by_code_or_alias(value[0])
            except Exception, e:
                pass
            try:
                storagefile = StorageFile.objects.get(id=int(value[1]))
            except Exception, e:
                pass

        # Fields in HTML
        rendered_fields = []
        rendered_fields.append(self.widgets[0].render(name + '_0',
            getattr(language, 'code', None), final_attrs))
        rendered_fields.append(self.widgets[1].render(name + '_1',
            getattr(storagefile, 'id', None), final_attrs))

        context = {
                'name': name,
                'names': [name + n %'_%s' for n, w in enumerate(self.widgets)],
                'storagefile': storagefile,
                'rendered_fields': rendered_fields,
                'api_storagefile_url': get_url_pattern('api.storage.file'),
                }

        return mark_safe(
            render_to_string('storage/storagefilewidget.html', context)
            )
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/storage/widgets.py/StorageFileWidget.render/swapped operands of `%`