# Path: django_core/html/builders.py
# def build_link(href, text, cls=None, icon_class=None, **attrs):
#     """Builds an html link.
# 
#     :param href: link for the anchor element
#     :param text: text for the anchor element
#     :param attrs: other attribute kwargs
# 
#     >>> build_link('xyz.com', 'hello', 'big')
#     u'<a href="xyz.com" class="big">hello</a>'
#     >>> build_link('xyz.com', 'hello', 'big', 'fa fa-times')
#     u'<a href="xyz.com" class="big"><i class="fa fa-times"></i> hello</a>'
#     """
#     return build_html_element(tag='a',
#                               text=text,
#                               href=href,
#                               cls=cls,
#                               icon_class=icon_class,
#                               **attrs)


from django.template import Library
from ..html.builders import build_link
        return obj.get_absolute_url_link(**kwargs)

    absolute_url = obj.get_absolute_url()
    return build_link(href=absolute_url, **kwargs)


@register.filter
def get_edit_url_link(obj, text=None):
    """Gets the absolute url html link for the object.

    Usage:

    {{ obj|get_edit_url_link:"Some Text" }}

    Would return:

    u'<a href="{{ THE OBJ EDIT URL }}">{{ TEXT THAT WAS PASSED IN }}</a>'
    """
    return edit_url_link(obj=obj, text=text)


@register.simple_tag
def edit_url_link(obj, **kwargs):
    """This method assumes that the "get_delete_url_link" method has been
    implemented on the obj.
    """
    if hasattr(obj, 'get_edit_url_link'):
        return obj.get_edit_url_link(**kwargs)

    edit_url = obj.get_edit_url()

# Path: django_core/html/builders.py
# def build_link(href, text, cls=None, icon_class=None, **attrs):
#     """Builds an html link.
# 
#     :param href: link for the anchor element
#     :param text: text for the anchor element
#     :param attrs: other attribute kwargs
# 
#     >>> build_link('xyz.com', 'hello', 'big')
#     u'<a href="xyz.com" class="big">hello</a>'
#     >>> build_link('xyz.com', 'hello', 'big', 'fa fa-times')
#     u'<a href="xyz.com" class="big"><i class="fa fa-times"></i> hello</a>'
#     """
#     return build_html_element(tag='a',
#                               text=text,
#                               href=href,
#                               cls=cls,
#                               icon_class=icon_class,
#                               **attrs)


# Path: django_core/templatetags/url_tags.py
from django.template import Library
from ..html.builders import build_link

        return obj.get_absolute_url_link(**kwargs)

    absolute_url = obj.get_absolute_url()
    return build_link(href=absolute_url, **kwargs)


@register.filter
def get_edit_url_link(obj, text=None):
    """Gets the absolute url html link for the object.

    Usage:

    {{ obj|get_edit_url_link:"Some Text" }}

    Would return:

    u'<a href="{{ THE OBJ EDIT URL }}">{{ TEXT THAT WAS PASSED IN }}</a>'
    """
    return edit_url_link(obj=obj, text=text)


@register.simple_tag
def edit_url_link(obj, **kwargs):
    """This method assumes that the "get_delete_url_link" method has been
    implemented on the obj.
    """
    if hasattr(obj, 'get_edit_url_link'):
        return obj.get_edit_url_link(**kwargs)

    edit_url = obj.get_edit_url()

    return build_link(href=edit_url, **kwargs)