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, Comment, FlaggedItem, LikedComment
\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 utils import KeyValue
\r
11 from south.modelsinspector import add_introspection_rules
\r
12 add_introspection_rules([], [r"^forum\.models\.utils\.\w+"])
\r
18 def is_new(sender, instance, **kwargs):
\r
20 instance._is_new = not bool(instance.id)
\r
24 pre_save.connect(is_new)
\r
27 'Node', 'NodeRevision', 'AnonymousNode',
\r
28 'Question', 'FavoriteQuestion', 'QuestionSubscription', 'QuestionRevision',
\r
29 'Answer', 'AnswerRevision',
\r
30 'Tag', 'Comment', 'Vote', 'FlaggedItem', 'MarkedTag', 'LikedComment', 'Badge', 'Award', 'Repute',
\r
31 'Activity', 'ValidationHash', 'AuthKeyUserAssociation', 'SubscriptionSettings', 'KeyValue', 'User',
\r
35 from forum.modules import get_modules_script_classes
\r
37 for k, v in get_modules_script_classes('models', models.Model).items():
\r
38 if not k in __all__:
\r
42 NodeMetaClass.setup_relations()