コード例 #1
0
ファイル: apps.py プロジェクト: sellllect/ndemo-master
    def ready(self):
        from django_comments.moderation import moderator

        from zinnia.signals import connect_entry_signals
        from zinnia.signals import connect_discussion_signals
        from zinnia.moderator import EntryCommentModerator

        entry_klass = self.get_model('Entry')
        # Register the comment moderator on Entry
        moderator.register(entry_klass, EntryCommentModerator)
        # Connect the signals
        connect_entry_signals()
        connect_discussion_signals()
コード例 #2
0
ファイル: apps.py プロジェクト: Fantomas42/django-blog-zinnia
    def ready(self):
        from django_comments.moderation import moderator

        from zinnia.signals import connect_entry_signals
        from zinnia.signals import connect_discussion_signals
        from zinnia.moderator import EntryCommentModerator

        entry_klass = self.get_model('Entry')
        # Register the comment moderator on Entry
        moderator.register(entry_klass, EntryCommentModerator)
        # Connect the signals
        connect_entry_signals()
        connect_discussion_signals()
コード例 #3
0
ファイル: __init__.py プロジェクト: yaronsamuel/morsite
"""Models for Zinnia"""
from zinnia.models.entry import Entry
from zinnia.models.author import Author
from zinnia.models.category import Category

from zinnia.signals import connect_entry_signals
from zinnia.signals import connect_discussion_signals
from zinnia.moderator import EntryCommentModerator
from django.contrib.comments.moderation import moderator

# Here we import the Zinnia's Model classes
# to register the Models at the loading, not
# when the Zinnia's URLs are parsed. Issue #161.
__all__ = [Entry.__name__, Author.__name__, Category.__name__]

# Register the comment moderator on Entry
moderator.register(Entry, EntryCommentModerator)

# Connect the signals
connect_entry_signals()
connect_discussion_signals()
コード例 #4
0
"""Models for Zinnia"""
from zinnia.models.entry import Entry
from zinnia.models.author import Author
from zinnia.models.category import Category

from zinnia.signals import connect_entry_signals
from zinnia.signals import connect_discussion_signals
from zinnia.moderator import EntryCommentModerator

try:
    from django_comments.moderation import moderator
except ImportError:
    from django.contrib.comments.moderation import moderator

# Here we import the Zinnia's Model classes
# to register the Models at the loading, not
# when the Zinnia's URLs are parsed. Issue #161.
__all__ = [Entry.__name__,
           Author.__name__,
           Category.__name__]

# Register the comment moderator on Entry
moderator.register(Entry, EntryCommentModerator)

# Connect the signals
connect_entry_signals()
connect_discussion_signals()