]> git.openstreetmap.org Git - osqa.git/blob - forum/models/__init__.py
Adds the option to create static pages with several options to customize its behaviour.
[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 from page import Page
11
12 try:
13     from south.modelsinspector import add_introspection_rules
14     add_introspection_rules([], [r"^forum\.models\.\w+\.\w+"])
15 except:
16     pass
17
18 from base import *
19
20 __all__ = [
21         'Node', 'NodeRevision', 'NodeState',  
22         'Question', 'QuestionSubscription', 'QuestionRevision',
23         'Answer', 'AnswerRevision',
24         'Tag', 'Comment', 'MarkedTag', 'Badge', 'Award',
25         'ValidationHash', 'AuthKeyUserAssociation', 'SubscriptionSettings', 'KeyValue', 'User',
26         'Action', 'ActionRepute', 'Vote', 'Flag', 'Page'
27         ]
28
29
30 from forum.modules import get_modules_script_classes
31
32 for k, v in get_modules_script_classes('models', models.Model).items():
33     if not k in __all__:
34         __all__.append(k)
35         exec "%s = v" % k
36
37 NodeMetaClass.setup_relations()
38 BaseMetaClass.setup_denormalizes()