]> git.openstreetmap.org Git - osqa.git/blob - forum/models/__init__.py
Some more improvements on the notifications, and applied two patches contributed...
[osqa.git] / forum / models / __init__.py
1 from question import Question ,QuestionRevision, QuestionSubscription
2 from answer import Answer, AnswerRevision
3 from tag import Tag, MarkedTag
4 from user import User, ValidationHash, AuthKeyUserAssociation, SubscriptionSettings
5 from node import Node, NodeRevision, NodeState, NodeMetaClass
6 from comment import Comment
7 from action import Action, ActionRepute
8 from meta import Vote, Flag, Badge, Award
9 from utils import KeyValue
10
11 try:
12     from south.modelsinspector import add_introspection_rules
13     add_introspection_rules([], [r"^forum\.models\.\w+\.\w+"])
14 except:
15     pass
16
17 from base import *
18
19 __all__ = [
20         'Node', 'NodeRevision', 'NodeState',  
21         'Question', 'QuestionSubscription', 'QuestionRevision',
22         'Answer', 'AnswerRevision',
23         'Tag', 'Comment', 'MarkedTag', 'Badge', 'Award',
24         'ValidationHash', 'AuthKeyUserAssociation', 'SubscriptionSettings', 'KeyValue', 'User',
25         'Action', 'ActionRepute', 'Vote', 'Flag'
26         ]
27
28
29 from forum.modules import get_modules_script_classes
30
31 for k, v in get_modules_script_classes('models', models.Model).items():
32     if not k in __all__:
33         __all__.append(k)
34         exec "%s = v" % k
35
36 NodeMetaClass.setup_relations()
37 BaseMetaClass.setup_denormalizes()