def modal_form(context, form, prefix):
    """
    Template tag {% modal_form form prefix %} to generate a model which has a
    form inside.

    Arguments
    ---------
        form: A django form.
        prefix: A prefix for the name.

    Returns
    -------
        Returns a context where the django form is mapped to form, the prefix
        string is mapped to prefix and the the csrf_token from the overall
        context is mapped to csrf_token.
    """
    return {
        'form': form,
        'prefix': prefix,
        'csrf_token': context['csrf_token']
    }