【发布时间】:2014-06-21 08:26:32
【问题描述】:
我正在尝试使用此代码在我的网页上添加点赞按钮
<iframe src="http://www.facebook.com/plugins/like.php?href={{request.build_absolute_uri}}&layout=button_count&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:80px;" allowTransparency="true">
</iframe>
<style>.fbook{position: absolute; font-color:#ddd; top:-1668px; font-size:10;}</style>
</style>
<a href="http://www.druckerverwaltung.de" class="fbook">Immer neue Informationen...</a>
<a href="http://www.videobeamer24.de" class="fbook">Eine neue Bestenliste im Netz</a>
<a href="http://www.howtoaddlikebutton.com" class="fbook">click</a>
<style>.fbook-style_map:initreaction=10false_attempt10-border</style>
<style>closemap"init"if=fb_connect-start="25"check_bandwith</style>
但在第一行中,我希望在 django 模板中动态显示当前页面的 url,所以我使用了 {{request.build_absolute_uri}},但它不起作用,虽然没有错误,但它没有像按钮一样显示。
它是正确的模板标签还是我必须做其他事情?
【问题讨论】:
-
你有要求安装中装吗?
标签: django facebook python-2.7 django-templates