Permalink
Browse files

Merge branch 'master' of https://github.com/arthurk/django-disqus

Remove the protocol from the URL, to support https as well as http, while
keeping the fix that attaches comments to the correct page instead of the
site root URL.

Conflicts:
	disqus/templatetags/disqus_tags.py
  • Loading branch information...
2 parents c6fb7b8 + 4b65423 commit 51eb9e0b1a3d04b21815b54ffcea441d5c34936e @qris qris committed Jul 17, 2014
View
@@ -1,7 +1,10 @@
from urllib import urlencode
import urllib2
-from django.utils import simplejson as json
+try:
+ import json
+except ImportError:
+ from django.utils import simplejson as json
# A custom ProxyHandler for the urllib2 module that will not
# auto-detect proxy settings
@@ -7,7 +7,7 @@
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
@@ -5,6 +5,6 @@
{{ config|safe }}
{% endblock %}
</script>
-<script src='http://{{ shortname }}.disqus.com/recent_comments_widget.js?num_items={{ num_items }}&hide_avatars={{ hide_avatars }}&avatar_size={{ avatar_size }}&excerpt_length={{ excerpt_length }}'>
+<script src='//{{ shortname }}.disqus.com/recent_comments_widget.js?num_items={{ num_items }}&hide_avatars={{ hide_avatars }}&avatar_size={{ avatar_size }}&excerpt_length={{ excerpt_length }}'>
</script>
</div>
@@ -8,10 +8,10 @@
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
/* ]]> */
</script>
-<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
-<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="//disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
@@ -65,7 +65,7 @@ def disqus_dev(context):
if settings.DEBUG:
return """<script type="text/javascript">
var disqus_developer = 1;
- var disqus_url = 'http://%s%s';
+ var disqus_url = '//%s%s';
</script>""" % (Site.objects.get_current().domain, context['request'].path)
return ""
View
@@ -4,7 +4,7 @@
setup(
name='django-disqus',
- version='0.4.1',
+ version='0.4.3',
description='Export comments and integrate DISQUS into your Django website',
author='Arthur Koziel',
author_email='arthur@arthurkoziel.com',

0 comments on commit 51eb9e0

Please sign in to comment.