1 from question import Question ,QuestionRevision, AnonymousQuestion, FavoriteQuestion, QuestionSubscription
\r
2 from answer import Answer, AnonymousAnswer, 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 utils import KeyValue
\r
10 from south.modelsinspector import add_introspection_rules
\r
11 add_introspection_rules([], [r"^forum\.models\.utils\.\w+"])
\r
17 def is_new(sender, instance, **kwargs):
\r
19 instance._is_new = not bool(instance.id)
\r
23 pre_save.connect(is_new)
\r
26 'Question', 'QuestionRevision', 'FavoriteQuestion', 'AnonymousQuestion', 'QuestionSubscription',
\r
27 'Answer', 'AnswerRevision', 'AnonymousAnswer',
\r
28 'Tag', 'Comment', 'Vote', 'FlaggedItem', 'MarkedTag', 'LikedComment', 'Badge', 'Award', 'Repute',
\r
29 'Activity', 'ValidationHash', 'AuthKeyUserAssociation', 'SubscriptionSettings', 'KeyValue', 'User',
\r
33 from forum.modules import get_modules_script_classes
\r
35 for k, v in get_modules_script_classes('models', models.Model).items():
\r
36 if not k in __all__:
\r