python flask模板中的链接标记不起作用

时间:2017-06-03 05:45:12

标签: python flask

我正在开发一个网络应用程序,我在其中显示网站列表,但问题是,当我点击www.example.com时,那么该网站将无法打开。代替

它将附加到localhost:5000 / www.example.com

example.com

//代码部分

     {% for k, v in  diction %}


 <a href="{{ bookKeeping[k]}}"> {{ bookKeeping[k] }}</a></br>


     {% endfor %}

1 个答案:

答案 0 :(得分:1)

请参阅Should I use absolute or relative URLs?HTML href Attribute 对于绝对URL,它应该是DECLARE CURTABLE CURSOR FOR SELECT A FROM TABLE A WHERE ID = 189 Order By ID OPEN curTable FETCH NEXT FROM curTable INTO @columnname DECLARE @tsql NVARCHAR(MAX) WHILE @@fetch_status=0 BEGIN IF @ViewFunctionValue IS NULL SET @tsql = @tsql + ' ' + quotename(@columnname,'[') ELSE SET @tsql=@tsql+@ViewFunctionValue IF @ViewFunctionValue IS NULL SET @tsql = @tsql + ' AS ' + quotename(@columnname,'[') SET @tsql = @tsql + ', ' + CHAR(10) FETCH NEXT FROM curTable INTO @columnname END CLOSE curTable DEALLOCATE curTable SET @tsql = LEFT(@tsql,LEN(@tsql)-3) + CHAR(10) SET @tsql= @tsql+' FROM ' + TABLEA PRINT @tsql