{% comment %}
    minor modification of django/forms/widgets/clearable_file_input.html to render file input inline with widget.input_text
{% endcomment %}

{% if widget.is_initial %}
    <span class="{{ widget.name }}_initial_text">{{ widget.initial_text }}</span>: <a href="{{ widget.value.url }}">{{ widget.value }}</a>
    {% if not widget.required %}
        <input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}">
        <label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>
    {% endif %}
    <br>
    <span class="{{ widget.name }}_input_text">{{ widget.input_text }}:</span>
{% endif %}
<input type="{{ widget.type }}" name="{{ widget.name }}" style="display:inline;"
       {% for name, value in widget.attrs.items %}
           {% if value is not False %}
               {{ name }}
               {% if value is not True %}="{{ value|stringformat:'s' }}"
               {% endif %}
           {% endif %}
       {% endfor %}
>
