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