8

I'm making a small personal django website for a beginning architect and should, among others, contain blogging functionality. I have been wondering for a while whether I should use an existing blogging app or write my own.

Of course there are many possible apps to use and for me, Zinnia looks pretty promising. However, I do have a problem with the way comments are implemented. As far as I can see it is implemented using the Django's commenting framework, but according to the Django documentation, this is deprecated (and should be replaced by a custom solution or something like Disqus).

So my question is: is there a way to disable comments in Zinnia completely (because I most likely won't need it). And also, is it possible to use Disqus in Zinnia? Because I can't really find anything on that in their documentation.

PieterV
  • 816
  • 10
  • 23

1 Answers1

9

I just successfully integrated Disqus into Zinnia.

Because django.contrib.comments is so tightly coupled to zinnia, I decided to take the easiest route.

Don't worry about removing the contributed django comments app. For each blog entry you want to uncheck "Comments enabled".

Then create your own zinnia theme and copy zinnia's entry_detail_base.html into your theme. In that file replace the contents for the block entry-comments with the code disqus provides in http://your_disqus_shortname.disqus.com/admin/settings/universalcode/

Turns out, it's a pretty easy solution.

pymarco
  • 7,807
  • 4
  • 29
  • 40
  • 3
    Worth deleting the entry-comments-form block too if you don't intend to use it. That way if you miss disabling comments on a post it still won't show a form using the in-built comment system. – Tom Manterfield Jul 03 '14 at 14:48
  • 1
    Like said unchecking "Comments enabled" for every blog entry seems rather tedious. Seeing how flexible Django models there's surely a way through inheritance to get rid of the comments. Also : "Please mark as accepted if this answers your question." does not belong in a question. Nonetheless it's a good answer, so +1. – Perry Mar 05 '15 at 09:35
  • Thanks Perry. I agree, and won't write "please mark..." any more. Cheers! – pymarco Mar 06 '15 at 16:38
  • As of at least Zinnia 0.13, you can set the setting ZINNIA_AUTO_CLOSE_COMMENTS_AFTER to zero to disable comments completely. [See the documentation](http://docs.django-blog-zinnia.com/en/develop/ref/settings.html#zinnia-auto-close-comments-after) on the current comment settings for more information. – jonpa Oct 21 '17 at 19:17