@register.simple_tag(takes_context=True)
def render_block_form(context, form):
    model = form._meta.model
    model_name = model.__name__.lower()
    template_names = [
        "%s/%s_form.html" % (model._meta.app_label, model_name),
        "fancypages/blocks/%s_form.html" % model_name, form.template_name]
    tmpl = loader.select_template(template_names)

    context['missing_image_url'] = "%s/%s" % (
        settings.MEDIA_URL, getattr(settings, "OSCAR_MISSING_IMAGE_URL", ''))
    return tmpl.render(context)
dataset/ETHPy150Open tangentlabs/django-fancypages/fancypages/templatetags/fp_block_tags.py/render_block_form/original