

def render(self, name, value, attrs=None):
    substitutions = {
        'initial_text': self.initial_text,
        'input_text': self.input_text,
        'clear_template': '',
        'clear_checkbox_label': self.clear_checkbox_label,
    }
    template = '%(input)s'
    substitutions['input'] = super(ClearableFileInput, self).render(name, value, attrs)
    if (value and hasattr(value, 'url')):
        template = self.template_with_initial
        substitutions['initial'] = format_html('<a href="{0}">{1}</a>', value.url, force_text(value))
        initial_filename_name = self.initial_filename_name(name)
        substitutions['initial_file'] = HiddenInput().render(initial_filename_name, value, attrs={
            'id': checkbox_name,
        })
        if (not self.is_required):
            checkbox_name = self.clear_checkbox_name(name)
            checkbox_id = self.clear_checkbox_id(checkbox_name)
            substitutions['clear_checkbox_name'] = conditional_escape(checkbox_name)
            substitutions['clear_checkbox_id'] = conditional_escape(checkbox_id)
            substitutions['clear'] = CheckboxInput().render(checkbox_name, False, attrs={
                'id': checkbox_id,
            })
            substitutions['clear_template'] = (self.template_with_clear % substitutions)
    return mark_safe((template % substitutions))

dataset/ETHPy150Open WGBH/django-multilingualfield/multilingualfield/widgets.py CustomClearableFileInput.render/VarMisuse@144/220 `initial_filename_name`->`checkbox_name`