django-disqus 不使用 set_disqus_url 或 set_disqus_identifier
我使用了旧版本的 https://github.com/arthurk/django-disqus/ 过去。当我升级到 0.4 时,新的模板标签 set_disqus_url 和 set_disqus_identifier 似乎不起作用。
我想 {% set_disqus_identifier "test" %}
应该在模板中设置 var disqus_identifier = 'test';
,对吗?
最后,我按照安装说明设置了站点、api 密钥和短名称。将 var disqus_identifier = 'test';
放入模板中即可。 那么,是不是 django-disqus 坏了?
编辑:django-disqus 的开发人员告诉我,将这些标签与 {% disqus_show_comments %}
放在同一个块中非常重要,这当然在文档 http://django-disqus.readthedocs.org/ en/latest/templatetags.html#disqus-show-comments。
I have used an old version of https://github.com/arthurk/django-disqus/ in the past. When I upgraded to 0.4, the new template tags, set_disqus_url and set_disqus_identifier, doesn't seem to work.
I guess {% set_disqus_identifier "test" %}
should set var disqus_identifier = 'test';
in the template, right?
Finally, I have followed the installation instruction, setting the SITE, api key and shortname. Putting var disqus_identifier = 'test';
in the template works.
So, could it be that django-disqus is broken?
EDIT: The developer of django-disqus told me that it is important to have these tags in the same block as {% disqus_show_comments %}
, which of course is mentioned in the docs http://django-disqus.readthedocs.org/en/latest/templatetags.html#disqus-show-comments.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这已经解决了,但可能对其他人有用。是否是您忘记加载 disqus 标签:
some_template.html
I think this is solved but may be it is useful for someone else. Could it be that you forgot to load the disqus tags:
some_template.html