首页 > 编程 > Python > 正文

详解python Todo清单实战

2020-02-15 23:31:25
字体:
来源:转载
供稿:网友

Todo清单

需要实现的功能有添加任务、删除任务、编辑任务,操作要关联数据库。

任务需要绑定用户,部门。用户需要绑定部门。

{#自己编写一个基类模板#}{% extends 'bootstrap/base.html' %}{% block styles %}{{ super() }}  <link rel="stylesheet" href="../static/css/main.css" rel="external nofollow" >{% endblock %}{% block navbar %}<nav class="navbar navbar-default">  <div class="container-fluid">    <!-- Brand and toggle get grouped for better mobile display -->    <div class="navbar-header">      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"          data-target="#bs-example-navbar-collapse-1" aria-expanded="false">        <span class="sr-only">Toggle navigation</span>        <span class="icon-bar"></span>        <span class="icon-bar"></span>        <span class="icon-bar"></span>      </button>      <a class="navbar-brand" href="index.html" rel="external nofollow" ></a>    </div>    <!-- Collect the nav links, forms, and other content for toggling -->    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">      <ul class="nav navbar-nav">        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >首页<span class="sr-only">(current)</span></a></li>        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >新闻</a></li>        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >国际</a></li>        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >国内</a></li>        <li><a href="/sysinfo/" rel="external nofollow" >系统信息</a></li>        <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >登陆用户</a></li>      </ul>      <ul class="nav navbar-nav navbar-right">        {% if 'user' in session %}        <li><a href="login.html" rel="external nofollow" ><span class="glyphicon glyphicon-user"></span>             {{ session.user }}</a></li>        <li><a href="/logout/" rel="external nofollow" ><span class="glyphicon glyphicon-log-in"></span>             注销 </a></li>        {% else %}        <li><a href="/login/" rel="external nofollow" ><span class="glyphicon glyphicon-log-in"></span>            登陆</a></li>        {% endif %}        <li><a href="/register/" rel="external nofollow" ><span class="glyphicon glyphicon-log-out"></span>            注册</a></li>      </ul>    </div><!-- /.navbar-collapse -->  </div><!-- /.container-fluid --></nav>{% endblock %}{% block content %}{#定义属于自己的block#}  {% block newcontent %}  {% endblock %}  {% block footer %}<div class="footer" style="margin: 0 auto">    宇宙大魔王</div>{% endblock %}{% endblock %}            
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表