标签:-- 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:
标签:-- layout end 组件 templates custom tom rap html
原文地址:https://www.cnblogs.com/dbslinux/p/12034556.html