comments_allowed function for your model/...

1
2
3
4
5
6
7
8
from django.contrib.comments.moderation import CommentModerator
from django.db import models

    class Entry(models.Model):
         #regular fields etc. defined here

         def comments_allowed(self):
             return CommentModerator(self.__class__).allow(None, self, None)

More like this

  1. Type checking templatetag filters by marcorogers 3 years, 2 months ago
  2. Simple Mobile Support by bahoo 2 years, 7 months ago
  3. FieldAccessForm (per-field user access for forms derived from models) by Killarny 4 years, 7 months ago
  4. fancy_if by Scanner 6 years, 1 month ago
  5. Generic model filter from request GET data by genbit 1 year, 9 months ago

Comments

(Forgotten your password?)