def get_absolute_url(self):
        """
        Returns absolute URL for the category.
        """
        if not self.tree_parent_id:
            url = reverse('root_homepage')
        else:
            url = reverse('category_detail', kwargs={'category' : self.tree_path})
        if self.site_id != settings.SITE_ID:
            # prepend the domain if it doesn't match current Site
            return 'http://' + self.site.domain + url
        return url
def get_absolute_url ( self ) : if not self . tree_parent_id : url = reverse ( 'root_homepage' ) else : url = reverse ( 'category_detail' , kwargs = { 'category' : self . tree_path } ) if self . site_id != settings . SITE_ID : return 'http://' + self . site . domain + url return url
Returns absolute URL for the category.