django-disqus not using set_disqus_url or set_disqus_identifier
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.
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
# load the tags
{% load disqus_tags %}
# get comments for your website
{% disqus_show_comments "YOUR_WEBSITE_SHORTNAME" %}
# get the url for the current object to get the right comments
{% set_disqus_url object.get_absolute_url %}
精彩评论