{% extends 'base.html' %}

{% block content %}
<div class="container">
<h1>客户信息列表</h1>
<form class="form-inline mb-3" method="GET" action="{% url 'customer_list' %}">
<input class="form-control mr-sm-2" type="search" name="search_query" placeholder="Search..."
aria-label="Search" value="{{ request.GET.search_query }}">
<button class="btn btn-outline-primary my-2 my-sm-0 mb-3" type="submit">查询</button>
<a class="btn btn-primary my-2 my-sm-0 mb-3" href="{% url 'customer_create' %}">新增客户信息</a>
</form>
<div class="row">
{% for customer in customers %}
<div class="col-md-6 col-lg-4 mb-4">
<div class="card h-100">
<div class="card-header bg-primary text-white">
<h5 class="card-title mb-0">{{ customer.cu_no }}</h5>
</div>
<div class="card-body">
<h5 class="card-title">{{ customer.cu_name }}</h5>
<p class="card-text"><strong>BILL TO:</strong> {{ customer.bill_to }}</p>
<p class="card-text"><strong>Address:</strong> {{ customer.bill_to_address }}</p>
<p class="card-text"><strong>Consignee:</strong> {{ customer.consignee }}</p>
<p class="card-text"><strong>SHIP TO:</strong> {{ customer.ship_to }}</p>
<p class="card-text"><strong>ADDRESS:</strong> {{ customer.ship_to_address }}</p>
<p class="card-text"><strong>CONTACT:</strong> {{ customer.contact }}</p>
<p class="card-text"><strong>SHIP BY:</strong> {{ customer.ship_by }}</p>
</div>
<div class="card-footer">
<a href="{% url 'customer_detail' customer.pk %}" class="btn btn-info">详情</a>
<a href="{% url 'customer_update' customer.pk %}" class="btn btn-warning">编辑</a>
<a href="{% url 'customer_delete' customer.pk %}" class="btn btn-danger">删除</a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div>
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center mt-3">
{% if customers.has_previous %}
<li class="page-item"><a class="page-link" href="?page=1">First</a></li>
<li class="page-item"><a class="page-link"
href="?page={{ customers.previous_page_number }}">Previous</a>
</li>
{% endif %}
<li class="page-item disabled"><a class="page-link" href="#">Page {{ customers.number }}
of {{ customers.paginator.num_pages }}</a></li>
{% if customers.has_next %}
<li class="page-item"><a class="page-link" href="?page={{ customers.next_page_number }}">Next</a>
</li>
<li class="page-item"><a class="page-link" href="?page={{ customers.paginator.num_pages }}">Last</a>
</li>
{% endif %}
</ul>
</nav>
</div>
{% endblock %}

card 卡片 html的更多相关文章

  1. Flutter学习笔记(21)--TextField文本框组件和Card卡片组件

    如需转载,请注明出处:Flutter学习笔记(21)--TextField文本框组件和Card卡片组件 今天来学习下TextField文本框组件和Card卡片组件. 只要是应用程序就少不了交互,基本上 ...

  2. flutter Card卡片列表组件

    一个 Material Design 卡片.拥有一个圆角和阴影 import 'package:flutter/material.dart'; import './model/post.dart'; ...

  3. Flutter AspectRatio、Card 卡片组件

    Flutter AspectRatio 组件 AspectRatio 的作用是根据设置调整子元素 child 的宽高比. AspectRatio 首先会在布局限制条件允许的范围内尽可能的扩展,widg ...

  4. Card 卡片

    将信息聚合在卡片容器中展示. 基础用法 包含标题,内容和操作. Card 组件包括header和body部分,header部分需要有显式具名 slot 分发,同时也是可选的. <el-card ...

  5. AspectRatio图片的宽高比、Card 卡片组件

    一.AspectRatio 组件 AspectRatio 的作用是根据设置调整子元素 child 的宽高比. AspectRatio 首先会在布局限制条件允许的范围内尽可能的扩展,widget 的高度 ...

  6. AspectRatio、Card 卡片组件

    一.Flutter AspectRatio 组件 AspectRatio 的作用是根据设置调整子元素 child 的宽高比. AspectRatio 首先会在布局限制条件允许的范围内尽可能的扩展,wi ...

  7. 3、card 卡片

    1.基本用法的使用 /* --- htm l----*/ <ion-content> <ion-card> <ion-card-header> Header < ...

  8. Bootstrap学习记录-3.Badge、Breadcrumb、Buttons、 Button Group、Card、Carousel

    1. Badge Badge作为数值标记组件,它能作为链接或按钮的一部分来提供计数作用,而且它通过使用相对字体大小来适应父级元素的大小.它的最基本的修饰符为.badge .badge-*. <b ...

  9. Android 之 2048 的游戏逻辑分析

    继续学习了极客学院的实战路径课程,讲到了2048游戏的编写过程,我在这里作个总结分享给大家(结果会附源代码和我改写后的代码): 这里主要包括两个方面:1.2048界面的绘制   2.2048算法逻辑的 ...

  10. English word

    第一部分  通过词缀认识单词 (常用前缀一) 1.a- ①加在单词(形容词)或词根前面,表示"不,无,非" acentric [ə'sentrik] a  无中心的(a+centr ...

随机推荐

  1. Django——messages消息框架

    在网页应用中,我们经常需要在处理完表单或其它类型的用户输入后,显示一个通知信息给用户.对于这个需求,Django提供了基于Cookie或者会话的消息框架messages,无论是匿名用户还是认证的用户. ...

  2. Spring Security 初学

    Spring Security 初学 声明:本篇文章无源码解析,属于初学范围,本文采用SpringBoot+thymeleaf的项目. 实现 SpringSecurity 分三步走 继承 WebSec ...

  3. Qt-FFmpeg开发-回调函数读取数据(8)

    音视频/FFmpeg #Qt Qt-FFmpeg开发-使libavformat解复用器通过自定义AVIOContext读取回调访问媒体内容 目录 音视频/FFmpeg #Qt Qt-FFmpeg开发- ...

  4. foxy rviz2 "rviz_common/Time"报错问题

    报错内容 The class required for this panel, 'rviz_common/Time', could not be loaded. Error: According to ...

  5. 微信小程序跳转重新加载目标页

    可用于在首次进入到小程序后就执行性了首页的onLoad方法,等你再去点击其它页面再回来的时候就不会加载onLoad了,比如你跳到登录页后再返回到首页会发现首页啥数据都没加载,所以你在登录那边进行跳转的 ...

  6. kettle从入门到精通 第五十三课 ETL之kettle MQTT/RabbitMQ consumer实战

    1.上一节课我们学习了MQTT producer 生产者步骤,MQTT consumer消费者步骤.该步骤可以从支持MRQTT协议的中间件获取数据,该步骤和kafka consumer 一样可以处理实 ...

  7. Python BeautifulSoup定位取值

    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ...

  8. 让Easysearch运行在LoongArch(3C5000L)上

    简介 在上一次,我介绍了在国产操作系统 Kylin V10 (Lance)-aarch64 上安装单机版 Easysearch/Console/Agent/Gateway/Loadgen,小伙伴们可查 ...

  9. vmware 和 hyper-v不兼容,此主机不支持64位客户机操作系统

    在控制面板中关闭hyper-v功能后,仍然提示此主机不支持64位客户机操作系统. 解决方法: 需要在开始按钮 - 右键  -打开Windows PowerShell(管理员). 输入: bcdedit ...

  10. sql server 怎么在原有表上加自增长主键列,并指定主键名

    sql server 怎么在原有表上加自增长主键列,并指定主键名: ALTER TABLE [Merchant_black] ADD  Id bigint identity(1,1)   constr ...