Annotate queryset with comment count
Code example queryset = Event.objects.all().select_related('user', 'category') queryset = comments_extra_count(queryset)
- comment
- count
- queryset
- annotate
Code example queryset = Event.objects.all().select_related('user', 'category') queryset = comments_extra_count(queryset)
See the description in the blog entry at [http://sciyoshi.com/blog/2008/aug/27/using-akismet-djangos-new-comments-framework/](http://sciyoshi.com/blog/2008/aug/27/using-akismet-djangos-new-comments-framework/)
This is an extension to ubernostrum's [comment-utils](http://code.google.com/p/django-comment-utils/) that performs comment moderation based on LinkSleeve check result. It requires original comment-utils package.
A short little bit of code to test for comment spam against Akimet. Use: a = Akismet('<AkismetKey>', 'http://sneeu.com/blog/') a.verify_key() print a.comment_check( comment_author='...', comment_author_email='[email protected]', user_ip='10.0.0.1', comment_content="""Comment content!""" )
4 snippets posted so far.