django-debug-toolbar只对某个用户(管理员)显示的设置方法

网上的一些文章都是介绍只对某个IP显示的,下面的设置是IP无关的(用户账号有关) 1、安装 sudo pip install django-debug-toolbar 2、在 settings.py 的 MIDDLEWARE_CLASSES 项中加入 'debug_toolbar.middleware.DebugToolbarMiddleware', 3、在 settings.py 中加入 def custom_show_toolbar(reques...
Python | 2015-11-30 02:37 | 阅读 3770 次 | 评论 0 条

Karabiner 10.9.0稳定性不错

作个记号,如果升级的版本体验不好就换回来 ======================= 2015-11-14 14:59 ========================= 10.14.0也很稳定,从10.10.0开始增加了取消"Use prepared settings"的功能,速度会更快,打字基本上跟不开karabiner差不多了
Mac | 2015-11-13 22:39 | 阅读 3679 次 | 评论 0 条

Jquery动态构建form

jQuery(function ($) { $.extend({ form: function (url, data, method) { if (method == null) method = 'POST'; if (data == null) data = {}; var form = $('<form>').attr({ method: method, action: url }).css({ display: 'none' }); var addData = function (na...
WEB开发 | 2015-11-13 16:32 | 阅读 4267 次 | 评论 0 条
浏览2776893次
文章归档