1 from question import Question ,QuestionRevision, FavoriteQuestion, QuestionSubscription
\r
2 from answer import Answer, AnswerRevision
\r
3 from tag import Tag, MarkedTag
\r
4 from meta import Vote, FlaggedItem
\r
5 from user import User, Activity, ValidationHash, AuthKeyUserAssociation, SubscriptionSettings
\r
6 from repute import Badge, Award, Repute
\r
7 from node import Node, NodeRevision, NodeMetaClass, AnonymousNode
\r
8 from comment import Comment
\r
9 from utils import KeyValue
\r
12 from south.modelsinspector import add_introspection_rules
\r
13 add_introspection_rules([], [r"^forum\.models\.\w+\.\w+"])
\r
19 def is_new(sender, instance, **kwargs):
\r
21 instance._is_new = not bool(instance.id)
\r
25 pre_save.connect(is_new)
\r
28 'Node', 'NodeRevision', 'AnonymousNode',
\r
29 'Question', 'FavoriteQuestion', 'QuestionSubscription', 'QuestionRevision',
\r
30 'Answer', 'AnswerRevision',
\r
31 'Tag', 'Comment', 'Vote', 'FlaggedItem', 'MarkedTag', 'Badge', 'Award', 'Repute',
\r
32 'Activity', 'ValidationHash', 'AuthKeyUserAssociation', 'SubscriptionSettings', 'KeyValue', 'User',
\r
36 from forum.modules import get_modules_script_classes
\r
38 for k, v in get_modules_script_classes('models', models.Model).items():
\r
39 if not k in __all__:
\r
43 NodeMetaClass.setup_relations()