All of the disqus comments are showing up on all t

2019-04-14 06:11发布

I've built a blog type app. in django. And I'm trying to integrate DISQUS for comments using montylounge's django-disqus. But comments from all the blog posts are showing up on every blog page. What could be the problem ?

标签: django disqus
3条回答
Lonely孤独者°
2楼-- · 2019-04-14 06:32

I think you should view page source code. Check disqus_url - is it an absolute URL?

In django-disqus often written like this: {% set_disqus_url object.get_absolute_url %} but object.get_absolute_url is your settings.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-04-14 06:44

I'm not sure how the django module integrates, but from a Disqus point of view it sounds like you're not setting a unique value for the "disqus_identifier" variable on each page.

You need to have the variable instantiated like this:

var disqus_identifier = 'blogpost_<BLOG POST ID HERE>';

before you include the disqus javascript files.

查看更多
Luminary・发光体
4楼-- · 2019-04-14 06:57

You can try this. In my case, it solved my problem similar to yours. Cheers!

var disqus_url = 'yoursite_dot_com/path_to/id-of-blog-post';

var disqus_identifier = '/id-of-blog-post/';

查看更多
登录 后发表回答