-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plug the signals when the apps are ready
- Loading branch information
1 parent
11891bf
commit 90cad29
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,12 @@ | ||
"""Models for Zinnia""" | ||
from django_comments.moderation import moderator | ||
|
||
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 | ||
|
||
# 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. | ||
# Issue #161, seems not valid since Django 1.7. | ||
__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() |