摘要: modelform 代码案例 : html 文件 {% for ziduan in form %} <div class="form-group"> <label for="exampleInputEmail1"> {{ ziduan.label }}</label> {{ ziduan }} </ 阅读全文
posted @ 2022-04-02 20:15 我在春天等伱 阅读(48) 评论(0) 推荐(0)
摘要: 1. srtting.py 文件去掉代码 'DIRS': [] 2. bootstrap 的引入路径 {% load static %} 绝对路径 #样式路径 <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> <s 阅读全文
posted @ 2022-04-02 14:22 我在春天等伱 阅读(101) 评论(0) 推荐(0)
摘要: 1. 首先创建数据 , 创建表 2. 文件model.py代码: from django.db import models'''部门表'''class BuMen(models.Model): title = models.CharField(verbose_name='部门名称', max_len 阅读全文
posted @ 2022-04-02 10:12 我在春天等伱 阅读(320) 评论(0) 推荐(0)