@register.tag(name="render_widget")
def do_render_widget(parser, token):
    try:
        tag_name, widget_slug = token.split_contents()
    except ValueError:
        raise template.TemplateSyntaxError("%r tag requires a single argument" % token.contents.split()[0])

    if not (widget_slug[0] == widget_slug[-1] and widget_slug[0] in ('"', "'")):
        raise template.TemplateSyntaxError(
            "%r tag's argument should be in quotes" % tag_name)
    return WidgetNode(widget_slug[1:-1])
dataset/ETHPy150Open ionyse/ionyweb/ionyweb/website/templatetags/ionyweb_tags.py/do_render_widget/original