from django import template
from django.utils.html import mark_safe

register = template.Library()


@register.simple_tag(takes_context=True)
def render_plugin(context, plugin):
    """
    Render a single plugin. See :mod:`feincms3.renderer` for additional
    details.
    """
    return context['renderer'].render_plugin_in_context(plugin, context)


@register.simple_tag(takes_context=True)
def render_plugins(context, plugins):
    """
    Render and concatenate a list of plugins. See
    :mod:`feincms3.renderer` for additional details.
    """
    renderer = context['renderer']
    return mark_safe(''.join(
        renderer.render_plugin_in_context(plugin, context)
        for plugin in plugins
    ))


@register.simple_tag(takes_context=True)
def render_region(context, regions, region, **kwargs):
    """
    Render a single region. See :class:`~feincms3.renderer.Regions` for
    additional details. Any and all keyword arguments are forwarded to the
    ``render`` method of the ``Regions`` instance.
    """
    return regions.render(region, context, **kwargs)

@@ -255,32 +255,152 @@
 nal%0A    details.
+%0A%0A    In general you should prefer%0A    :func:%60~feincms3.templatetags.feincms3_renderer.render_region%60 over this%0A    tag.
 %0A    %22%22%22%0A    ret
@@ -656,16 +656,136 @@
 details.
+%0A%0A    In general you should prefer%0A    :func:%60~feincms3.templatetags.feincms3_renderer.render_region%60 over this%0A    tag.
 %0A    %22%22%22

Add note to render_plugin[s] that render_region should be preferred