会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
人生苦短,我用python
快放弃的时候想想当初为什么坚持
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2017年4月12日
django分页
摘要: django提供的分页器实现分页 html bbs_tags
阅读全文
posted @ 2017-04-12 14:29 hongpeng0209
阅读(131)
评论(0)
推荐(0)
2017年3月24日
django ORM
摘要: 1、models.py中创建类和字段 外键关联的时候如果没写和另一个表的哪个字段关联的话,默认是和主键关联。 2、python manage.py makemigrations python manage.py migrate settings.py 需要注册APP 如果表中已经存在数据,新增字段的
阅读全文
posted @ 2017-03-24 18:42 hongpeng0209
阅读(210)
评论(0)
推荐(0)
2017年3月21日
BBS
摘要: 准备 新建工程 django-admin startproject BBS 新建app python3 manage.py startapp bbs 设计表结构 评论自关联,需要加上related_name,null=True默认可以为空,但是在django中需要加上blank=True admin
阅读全文
posted @ 2017-03-21 10:37 hongpeng0209
阅读(354)
评论(0)
推荐(0)
2017年3月20日
django进阶
摘要: django ORM操作 models.py terminal下进行数据库的增删改查 book表增加数据,关联author和publisher表,所以先创建author和publisher,创建时不能直接指定author 查 返回列表 models.Book.objects.fliter() 返回单
阅读全文
posted @ 2017-03-20 18:17 hongpeng0209
阅读(381)
评论(0)
推荐(0)
2017年3月7日
django
摘要: http://docs.30c.org/djangobook2 MVC 设计模式 首先,我们分成4个Python的文件,(models.py ,views.py , urls.py ) 和html模板文件 (latest_books.html ) models.py 文件主要用一个 Python 类
阅读全文
posted @ 2017-03-07 19:20 hongpeng0209
阅读(323)
评论(0)
推荐(0)
javascript+jQuery补充
摘要: 一、jQuery事件绑定 委托绑定 页面框架加载完成: $(function () { ... })使用:希望查看页面立即执行的操作 阻止默认事件的发生: $('#bd').click(function () { var v = $(this).text(); alert(v); return fa
阅读全文
posted @ 2017-03-07 11:12 hongpeng0209
阅读(148)
评论(0)
推荐(0)
2017年2月27日
jQuery
摘要: jQuery的选择器和筛选器 http://jquery.cuishifeng.cn/index.html 插件: 开发: xxxx.js 线上: xxxx.min.js版本: 1.x 1.12.x 2.x 3.x 一、查找 选择器(括号里面是字符串) $('#i1') -> 找id=i1的标签 $
阅读全文
posted @ 2017-02-27 11:07 hongpeng0209
阅读(180)
评论(0)
推荐(0)
html+css+dom补充
摘要: 补充1:页面布局 一般像京东主页左侧右侧都留有空白,用margin:0 auto居中,一般.w。 补充2:页面清除浮动 之前都是用clear:both .clearfix:after对clearfix类里面的孩子做点什么 display:none隐藏,位置都不留 visibility:hidden隐
阅读全文
posted @ 2017-02-27 11:05 hongpeng0209
阅读(233)
评论(0)
推荐(0)
2017年2月21日
javascript
摘要: http://www.cnblogs.com/wupeiqi/articles/5602773.html 跑马灯案例 显示时间案例 表格案例 模态框 创建节点Attribute
阅读全文
posted @ 2017-02-21 13:38 hongpeng0209
阅读(168)
评论(0)
推荐(0)
2017年2月13日
css
摘要: 概念: CSS(cascading style sheet,层叠样式表)是一种制作网页的新技术,现在已经为大多数浏览器所支持,成为网页设计必不可少的工具之一 css语法结构 每个CSS样式由两个组成部分:选择器和声明。声明又包括属性和属性值。每个声明之后用分号结束 在css的三个组成部分中,“对象”
阅读全文
posted @ 2017-02-13 11:46 hongpeng0209
阅读(297)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告