Django框架模板的继承

 

 

 


<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/favicon.ico">
<link rel="canonical" href="https://getbootstrap.com/docs/3.4/examples/theme/">

{% block title %}
<title>INIT</title>
{% extends %}

<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/dist/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/examples/theme/theme.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/assets/js/ie-emulation-modes-warning.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>


<div class="container theme-showcase" role="main">

<div class="row">
<div class="col-md-2">
<div class="panel panel-default">
<div class="panel-heading">导航</div>
<div class="panel-boby">
<p><a href="/books">书籍信息</a></p>
<p><a href="/2019ncov">疫情信息展示</a></p>
<p><a href="/timer">时间展示</a></p>
</div>
</div>
</div>

<div class="col-md-10">
10
</div>

</div>

{% block content %}
{% endblock %}


</div> <!-- /container -->


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.jsdelivr.cn/npm/jquery@1.12.4/dist/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/assets/js/docs.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="https://cdn.jsdelivr.cn/npm/@bootcss/v3.bootcss.com@1.0.43/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

 

 

{% extends "base.html" %}

{% block title %}
<title>疫情信息展示</title>
{% endblock %}

{% block content %}

<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>疫情信息展示</h1>
<p>This is a template showcasing the optional theme stylesheet included in Bootstrap. Use it as a starting point to create something more unique by building on or modifying it.</p>
</div>

<table class="table">
<tr>
<th> 城市名称</th>
<th> 新增疑似</th>
<th> 死亡人数</th>
<th> 新增人数</th>
</tr>
{% for i in data %}
<tr>
<td>{{properties.item.name}}</td>
<td>{{properties.item.新增疑似}}</td>
<td>{{properties.item.死亡人数}}</td>
<td>{{properties.item.新增人数}}</td>
</tr>
{% endfor %}
</table>

 

posted @ 2022-07-02 17:22  呼长喜  阅读(56)  评论(0编辑  收藏  举报