我试图创建一个指向相关user
的列。我决定试试URLColumn
。Text属性工作正常,但当我尝试添加href
url时,它会呈现<a href="None">Text</a>
。你知道吗
你知道问题出在哪里吗?你知道吗
class PossiblePairsTable(tables.Table):
customer_one = tables.URLColumn(attrs={'href':'somehref'},text=lambda x: x.reservation_one.customer.userprofile.display_name,)
URLColumn
是指当列的值是URL时使用的。你知道吗尝试改用^{} 。你知道吗
相关问题 更多 >
编程相关推荐