• 一百一十: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模板中加入链接

     

  • 相关阅读:
    BeforeFieldInit解析(zz)
    自定义控件
    How to make Office VBA code interact with a VSTO applicationlevel addin
    总结
    IL汇编语言程序设计目录
    zz如何精简用户界面
    volatile关键字的作用(zz)
    外企面试基本涵盖了所有问题(拿得别人的,很有用)
    Excel 2007 There was a problem sending the command to the program
    数据库技巧
  • 原文地址:https://www.cnblogs.com/zhongyehai/p/11938080.html
Copyright © 2020-2023  润新知