Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed tons of issues

  • Loading branch information...
commit fba039a0ca58b47d66fdfa2655116cdd09ea6865 1 parent 4e1b7ce
@ojii ojii authored
View
4 cmsplugin_disqus/cms_plugins.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
+from cmsplugin_disqus import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
@@ -9,10 +10,11 @@ class DisqusPlugin(CMSPluginBase):
render_template = 'cmsplugin_disqus/disqus_plugin.html'
admin_preview = False
name = _('Disqus Plugin')
+ model = models.DisqusPlugin
def render(self, context, instance, placeholder):
context['DISQUS_SHORTNAME'] = settings.DISQUS_SHORTNAME
context['instance'] = instance
- context['developer_mdoe'] = settings.DEBUG
+ context['developer_mode'] = settings.DEBUG
return context
plugin_pool.register_plugin(DisqusPlugin)
View
9 cmsplugin_disqus/templates/cmsplugin_disqus/disqus_plugin.html
@@ -1,6 +1,10 @@
+{% load sekizai_tags %}
<div id="disqus_thread"></div>
+<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>
+{% addtoblock "js" %}
<script type="text/javascript">
- var disqus_shortname = {{ DISQUS_SHORTNAME }};
+ var disqus_shortname = '{{ DISQUS_SHORTNAME }}';
var disqus_identifier = 'cmsplugin-disqus-{{ instance.pk }}';
var disqus_title = {{ instance.javascript_quoted_title }};
{% if developer_mode %}var disqus_developer = 1;{% endif %}
@@ -11,5 +15,4 @@
(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>
+{% endaddtoblock %}
View
3  setup.py
@@ -30,10 +30,9 @@
author='Djeese Factory GmbH',
author_email='say@djee.se',
url='https://github.com/djeese/cmsplugin-disqus',
- packages=['cmsplugin_disqus'],
+ packages=['cmsplugin_disqus', 'cmsplugin_disqus.migrations'],
install_requires=INSTALL_REQUIRES,
license='LICENSE.txt',
- license='BSD License',
platforms=['OS Independent'],
classifiers=CLASSIFIERS,
long_description=open('README.rst').read(),
Please sign in to comment.
Something went wrong with that request. Please try again.