def upload_media(request, form_cls, up_file_callback, instance=None, **kwargs):
    form = form_cls(request.POST, request.FILES)
    if request.method == 'POST' and form.is_valid():
        return up_file_callback(request.FILES, request.user, **kwargs)
    elif not form.is_valid():
        return form.errors
    return None
Render a form field with the label attached.
dataset/ETHPy150Open mozilla/kitsune/kitsune/upload/utils.py/upload_media--crossover with--dataset/ETHPy150Open watsonpy/watson-framework/watson/framework/support/jinja2/filters.py/label