一百一十:CMS系统之剩余菜单栏的页面和视图
增加所有剩余菜单的页面,并用视图渲染,方便后面调试权限控制
{% extends 'cms/cms_base.html' %}
{% block title %}板块管理{% endblock %}
{% block head %}
{% endblock %}
{% block page_title %}
{{ self.title() }}
{% endblock %}
{% block main_content %}
板块管理页面
{% endblock %}
{% extends 'cms/cms_base.html' %}
{% block title %}评论管理{% endblock %}
{% block head %}
{% endblock %}
{% block page_title %}
{{ self.title() }}
{% endblock %}
{% block main_content %}
评论管理页面
{% endblock %}
{% extends 'cms/cms_base.html' %}
{% block title %}CMS角色管理{% endblock %}
{% block head %}
{% endblock %}
{% block page_title %}
{{ self.title() }}
{% endblock %}
{% block main_content %}
CMS角色管理页面
{% endblock %}
{% extends 'cms/cms_base.html' %}
{% block title %}CMS用户管理{% endblock %}
{% block head %}
{% endblock %}
{% block page_title %}
{{ self.title() }}
{% endblock %}
{% block main_content %}
CMS用户管理页面
{% endblock %}
{% extends 'cms/cms_base.html' %}
{% block title %}前台用户管理{% endblock %}
{% block head %}
{% endblock %}
{% block page_title %}
{{ self.title() }}
{% endblock %}
{% block main_content %}
前台用户管理页面
{% endblock %}
{% extends 'cms/cms_base.html' %}
{% block title %}帖子管理{% endblock %}
{% block head %}
{% endblock %}
{% block page_title %}
{{ self.title() }}
{% endblock %}
{% block main_content %}
帖子管理页面
{% endblock %}
视图中渲染
@bp.route('/posts/')
@login_required
def posts():
return render_template('cms/cms_posts.html')
@bp.route('/comments/')
@login_required
def comments():
return render_template('cms/cms_comments.html')
@bp.route('/boards/')
@login_required
def boards():
return render_template('cms/cms_boards.html')
@bp.route('/fusers/')
@login_required
def fusers():
return render_template('cms/cms_fusers.html')
@bp.route('/cusers/')
@login_required
def cusers():
return render_template('cms/cms_cusers.html')
@bp.route('/croles/')
@login_required
def croles():
return render_template('cms/cms_croles.html')
在base模板中加入链接
讨论群:249728408