So this is the code I am using to set the javascript variable for discus:
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'myactualshortname'; // required: replace example with your forum shortname
var disqus_identifier = '{{ post.get_absolute_url }}';
var disqus_title = '{{ post.title }}';
var disqus_url = '{{ BASE_URL }}{{ post.get_absolute_url }}';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
Now when I go to the admin panel and check the link in disqus it gives me this
http://127.0.0.1:8000/blog/post/2#comment-1449921931
Here is an example of what is actually being rendered:
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'myactualshortname'; // required: replace example with your forum shortname
var disqus_identifier = '/blog/post/2/setting-up-your-environment/';
var disqus_title = 'Setting up your environment';
var disqus_url = 'http://127.0.0.1:8000/blog/post/2/setting-up-your-environment/';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
I have placed this at the bottom of the page after the disqus thread div. In the admin panel the link it generates for each thread is always http://127.0.0.1:8000/blog/post/2
with the number at the end being the only thing changed for new posts created. As you can see its not using the disqus_url as the link. It is functioning correctly however with a unique thread for each post etc.
Am I doing something wrong, does anyone know why this is occurring? I've tried just about everything from deleting the site, moving the script etc.
The comment count works correctly using the supplied count.js script HOWEVER I am trying to get counts for non A tag elements using the API and the disqus_url, but since its looking for the correct URL generated by the template it cant find the thread (which has used the wrong one for some reason).
Any help would be appreciated. Thanks