From 6149597d6f6f495a63f3ead6630116b8f71a63db Mon Sep 17 00:00:00 2001 From: Aditya Ambadkar Date: Wed, 11 Nov 2015 16:40:50 -0500 Subject: [PATCH] Allow text field to represent a url --- table/columns/linkcolumn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/table/columns/linkcolumn.py b/table/columns/linkcolumn.py index 0c648c3..aacc38e 100644 --- a/table/columns/linkcolumn.py +++ b/table/columns/linkcolumn.py @@ -23,7 +23,7 @@ class Link(object): """ Represents a html tag. """ - def __init__(self, text=None, viewname=None, args=None, kwargs=None, urlconf=None, + def __init__(self, text=None, complete_url_in_text=False, viewname=None, args=None, kwargs=None, urlconf=None, current_app=None, attrs=None): self.basetext = text self.viewname = viewname @@ -41,6 +41,9 @@ def text(self): @property def url(self): + if self.complete_url_in_text: + return self.text + if self.viewname is None: return ""