123456789101112131415161718192021222324252627282930313233343536373839404142 |
- from .views import BaseView
- from forums.extension import db
- from forums.api.forums.models import Board
- from forums.api.tag.models import Tags
- class BoardView(BaseView):
- form_excluded_columns = ('topics')
- class TagView(BaseView):
- column_searchable_list = ['name']
- form_excluded_columns = ('topics', 'followers')
- def register_forums(admin):
- admin.add_view(
- BoardView(
- Board,
- db.session,
- name='管理版块',
- endpoint='admin_board',
- category='管理社区'))
- admin.add_view(
- TagView(
- Tags,
- db.session,
- name='管理节点',
- endpoint='admin_tag',
- category='管理社区'))
|