Python Attrs参数不';在URL列中不工作(Django-tables2)

Python Attrs参数不';在URL列中不工作(Django-tables2),python,django,django-tables2,Python,Django,Django Tables2,我正在尝试创建一个指向相关用户的列。我决定试试URLColumn。文本属性工作正常,但当我尝试添加hrefurl时,它会呈现 你知道问题出在哪里吗 class PossiblePairsTable(tables.Table): customer_one = tables.URLColumn(attrs={'href':'somehref'},text=lambda x: x.reservation_one.customer.userprofile.display_name,) URLC

我正在尝试创建一个指向相关
用户的列。我决定试试
URLColumn
。文本属性工作正常,但当我尝试添加
href
url时,它会呈现

你知道问题出在哪里吗

class PossiblePairsTable(tables.Table):
    customer_one = tables.URLColumn(attrs={'href':'somehref'},text=lambda x: x.reservation_one.customer.userprofile.display_name,)

URLColumn
用于列的值为URL时

试着改用