# 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.db import models
from django_core.html.builders import build_link
    * get_link_text_field()

    to the model and that field will be used for the text.

    * get_absolute_url - returns the absolute link to the object.
    * get_edit_url - returns the link to edit the object
    * get_delete_url - return the link to delete the object.
    """

    class Meta:
        abstract = True

    def get_absolute_url_link(self, text=None, cls=None, icon_class=None,
                              **attrs):
        """Gets the html link for the object."""
        if text is None:
            text = self.get_link_text()

        return build_link(href=self.get_absolute_url(),
                          text=text,
                          cls=cls,
                          icon_class=icon_class,
                          **attrs)

    def get_edit_url_link(self, text=None, cls=None, icon_class=None,
                          **attrs):
        """Gets the html edit link for the object."""
        if text is None:
            text = 'Edit'


# 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/db/models/mixins/urls.py
from django.db import models
from django_core.html.builders import build_link

    * get_link_text_field()

    to the model and that field will be used for the text.

    * get_absolute_url - returns the absolute link to the object.
    * get_edit_url - returns the link to edit the object
    * get_delete_url - return the link to delete the object.
    """

    class Meta:
        abstract = True

    def get_absolute_url_link(self, text=None, cls=None, icon_class=None,
                              **attrs):
        """Gets the html link for the object."""
        if text is None:
            text = self.get_link_text()

        return build_link(href=self.get_absolute_url(),
                          text=text,
                          cls=cls,
                          icon_class=icon_class,
                          **attrs)

    def get_edit_url_link(self, text=None, cls=None, icon_class=None,
                          **attrs):
        """Gets the html edit link for the object."""
        if text is None:
            text = 'Edit'


        return build_link(href=self.get_edit_url(),