문제

From the documentation: "Django’s comment framework has been deprecated and is no longer supported. Most users will be better served with a custom solution, or a hosted product like Disqus. The code formerly known as django.contrib.comments is still available in an external repository."

Is the move to django-contrib-comments only a fallback for existing projects that use django.contrib.comments? Should I use django-contrib-comments in new projects and why (not)?

도움이 되었습니까?

해결책

I have been developing comments for our site using django.contrib.comments and found it to be quite a simple module and nothing else. If you are building a "just" commenting app to engage people, disqus might be a nice option. For instance, if you are building something like what stackoverflow is doing, you need to do by yourself.

For that, you can pretty well use django.contrib.comments and built your rest of the code on the top of it. I have been doing this and the following are points I would like to note

  1. Very good chance that you are going to write all Views again for Ajax support or any other custom support
  2. The app does not authenticate users. So, you might need to tweak this too
  3. Add some special fields in comments, remove some provided
  4. You might want to provide users to delete comments.. The built-in delete is just a flag where its marked "deleted" but not deleted exactly..

Regarding administration of commments, there might be lot you are going to improve.

It goes on, when you start doing it, you continue to tweak almost everything and make fit for your site. Probably if your tweaks seems to look too huge, I guess, start from scratch or take only parts of that django.contrib.comments where ever needed..

다른 팁

The Google Groups Django developers has the proposal:

"... if you don't really care much about how comments work but just want something easy, then Disqus (and its competitors) are easier to use and have much better features (spam prevents, moderation, etc.). If you want something complex and specific, on the other hand, you're better off writing something from scratch."

And the django-contrib-comments (the new home) is intended as a boneyard.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top