@contextfunction
def help_link(context, link=''):
    "Block with objects permissions"
    request = context['request']
    response_format = 'html'
    if 'response_format' in context:
        response_format = context['response_format']

    if not link:
        url = request.path
        match = re.match('/(?P<url>\w+)(/)?.*', url)
        if match:
            link = match.group('url') + "/"

    link = getattr(settings, 'HARDTREE_HELP_LINK_PREFIX', '/help/') + link

    return Markup(render_to_string('core/tags/help_link_block',
                                   {'link': link},
                                   context_instance=RequestContext(request),
                                   response_format=response_format))
dataset/ETHPy150Open treeio/treeio/treeio/core/templatetags/object.py/help_link/original