码迷,mamicode.com
首页 > 其他好文 > 详细

四.1--客户信息添加及展示

时间:2019-12-13 13:54:07      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:--   layout   end   组件   templates   custom   tom   rap   html   

一.写客户列表

(1.)全局views.py:

#展示客户列表
def customer_list(request):#返回页面
return render(request,‘crm/customer_list.html‘)

(2).创建crm相关的模版templates/crm/customer_list.html:--继承layout.html母版

定义自己的面板:bootstrap--组件--面板--带表格的面板模版拷贝到它的block块中.

(3).拿数据--拿到所有的客户

(4)但现在没数据,所以要添加数据.直接在数据库中添加要迁移不方便----用admin中添加crm/admin.py:

四.1--客户信息添加及展示

标签:--   layout   end   组件   templates   custom   tom   rap   html   

原文地址:https://www.cnblogs.com/dbslinux/p/12034556.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!