摘要: 设置字段可选 After you play around with the admin site for a while, you’ll probably notice a limitation – the edit forms require every field to be filled ou 阅读全文
posted @ 2017-11-27 11:51 木槿惜年 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1. django站点管理的特性: 它读取你模型中的元数据,然后提供给你一个强大而且可以使用的界面,网站管理者可以用它立即工作。 2. django的管理工具被称作 django.contrib.admin 3. django.contrib中其他的可用特性: 用户鉴别系统(django.contr 阅读全文
posted @ 2017-11-24 17:41 木槿惜年 阅读(2338) 评论(0) 推荐(1) 编辑
摘要: 前提条件: 1. 此处假定有一个app叫books,该books的模型定义如下: 2. 在一个django项目中,运行 python manage.py shell 进入shell模式 在shell命令行中展示基本数据访问方法: 1. 两步完成对象的创建与存储至数据库 2. 一步到位完成对象的创建与 阅读全文
posted @ 2017-11-24 11:39 木槿惜年 阅读(655) 评论(0) 推荐(0) 编辑
摘要: 1、AngularJs中的Module可以包含哪些组件?(1)value:保存可以在不同的controller之间共享的对象、数据(2)constant:保存可以在不同的controller之间共享的常量(3)service:保存可以在不同的controller之间共享的对象、数据、操作(4)fil 阅读全文
posted @ 2016-10-27 17:02 木槿惜年 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 对应的js文件: 对应的json文件: 对应的css文件: 阅读全文
posted @ 2016-10-23 20:12 木槿惜年 阅读(2967) 评论(0) 推荐(0) 编辑
摘要: 对应js: 阅读全文
posted @ 2016-10-23 15:40 木槿惜年 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 对应的Js: 阅读全文
posted @ 2016-10-23 12:55 木槿惜年 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 水平垂直居中常见方式总结 html结构为: (1)父元素相对定位,子元素关键在于设置为绝对定位,margin:auto (2)父元素相对定位,子元素绝对定位,且设置transform:translate(-50%,-50%) (3)父元素设置为display:flex;justify-content 阅读全文
posted @ 2016-09-19 23:23 木槿惜年 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 左边固定,右边自适应常见方式总结 html结构如下: (1)左边向左浮动并固定宽度,右边给margin-left (注:右边这个div一定不能给width:100%) (2)父元素相对定位,左边绝对定位并给固定宽度,右边margin-left (注:右边这个div一定不能给width:100%) ( 阅读全文
posted @ 2016-09-19 18:40 木槿惜年 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 灵活的语言---javascript 姓名 邮箱 密码 阅读全文
posted @ 2016-07-27 17:33 木槿惜年 阅读(138) 评论(0) 推荐(0) 编辑