1、在settings中的INSTALLED_APPS配置当前app,不然django无法找到自定义的simple_tag. 2、在app中创建templatetags模块(模块名只能是templatetags) 3、创建任意 .py 文件,如:my_tags.py 4、在使用自定义simple_t ...
分类:
其他好文 时间:
2018-11-23 22:53:59
阅读次数:
272
Social Media Addiction Children as young as ten are becoming dependent on social media for their sense of self-worth, a major study warned. 一项重大的研究警告称 ...
分类:
其他好文 时间:
2018-11-22 15:19:41
阅读次数:
784
一、题目描述 A full binary tree is a binary tree where each node has exactly 0 or 2 children. Return a list of all possible full binary trees with N nodes. ...
分类:
其他好文 时间:
2018-11-19 21:37:58
阅读次数:
192
MyBatis缓存 我们知道,频繁的数据库操作是非常耗费性能的(主要是因为对于DB而言,数据是持久化在磁盘中的,因此查询操作需要通过IO,IO操作速度相比内存操作速度慢了好几个量级),尤其是对于一些相同的查询语句,完全可以把查询结果存储起来,下次查询同样的内容的时候直接从内存中获取数据即可,这样在某 ...
分类:
其他好文 时间:
2018-11-17 20:48:28
阅读次数:
159
在使用该技巧时,建议先看一下相关的知识,点我查看 假如使用该属性时,想把父组件的所有属性及部分方法传递给子组件,该怎么办呢?看代码 ...
分类:
其他好文 时间:
2018-11-17 13:09:21
阅读次数:
134
There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is either ...
分类:
其他好文 时间:
2018-11-17 11:52:08
阅读次数:
142
html='<select class="placeWidth fl" id="' + data.returnData[i].children[j].pfieldname + '_ss" onchange="refreshQList_sy(\' '+data.returnData[i].childr ...
分类:
其他好文 时间:
2018-11-16 13:18:06
阅读次数:
544
一、对象冒充 离线浏览器软件 其原理如下:构造函数使用 this 关键字给所有属性和方法赋值(即采用类声明的构造函数方式)。因为构造函数只是一个函数,所以可使 Parent 构造函数 成为 Children 的方法,然后调用它。Children 就会收到 Parent 的构造函数中定义的属性和方法。 ...
分类:
编程语言 时间:
2018-11-14 15:35:50
阅读次数:
180
前端拿到所有数据实现分页函数代码如下: end = end > getdata.children.length ? getdata.children.length : end; 这个函数很简单可以再次封装一下 就可以一直使用了如下 然后渲染这个函数的返回值就行了 number改变数据跟着改变实现数据 ...
分类:
其他好文 时间:
2018-11-14 12:39:25
阅读次数:
144
编辑: $('#Teacher').find('option').each(function(){ $(this).attr('selected',$(this).val()==data.tid); }); $('#bookType').next().children().eq(0).childre ...
分类:
其他好文 时间:
2018-11-11 21:02:46
阅读次数:
115