~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to threadedcomments/moderation.py

threaded comments cleanup; removing IPAddressField

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from django.db.models import signals
2
 
from threadedcomments.models import ThreadedComment, FreeThreadedComment, MARKUP_CHOICES
 
2
from threadedcomments.models import ThreadedComment, MARKUP_CHOICES
3
3
from threadedcomments.models import DEFAULT_MAX_COMMENT_LENGTH, DEFAULT_MAX_COMMENT_DEPTH
4
4
from comment_utils import moderation
5
5
 
37
37
class Moderator(moderation.Moderator):
38
38
 
39
39
    def connect(self):
40
 
        for model in (ThreadedComment, FreeThreadedComment):
41
 
            signals.pre_save.connect(self.pre_save_moderation, sender=model)
42
 
            signals.post_save.connect(self.post_save_moderation, sender=model)
 
40
        signals.pre_save.connect(self.pre_save_moderation, sender=ThreadedComment)
 
41
        signals.post_save.connect(self.post_save_moderation, sender=ThreadedComment)
43
42
 
44
43
    # THE FOLLOWING ARE HACKS UNTIL django-comment-utils GETS UPDATED SIGNALS
45
44
    # ####