from boards import settings from boards.views.thread import ThreadView TEMPLATE_TREE = 'boards/thread_tree.html' CONTEXT_OP = 'opening_post' CONTEXT_BUMPABLE = 'bumpable' class TreeThreadView(ThreadView): def get_template(self): return TEMPLATE_TREE def get_data(self, thread): params = dict() bumpable = thread.can_bump() params[CONTEXT_BUMPABLE] = bumpable max_posts = thread.max_posts params[CONTEXT_OP] = thread.get_opening_post() return params def get_mode(self): return 'tree'