上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 28 下一页
摘要: You can use the redirect() function in a number of ways. By passing some object; that object’s get_absolute_url() method will be called to figure out 阅读全文
posted @ 2016-05-05 17:57 wswang 阅读(2759) 评论(0) 推荐(0)
摘要: 项目之前使用memcache做缓存,现在转到redis,改写几个语句的事情,然后就这种我把django-redis和py-redis搞混了,记录一下。 django默认使用memcache做缓存,这里的操作一般是cache.get() cache.set()这种,要想操作使用from django. 阅读全文
posted @ 2016-05-04 22:27 wswang 阅读(2291) 评论(0) 推荐(0)
摘要: https://www.v2ex.com/t/142644 http://stackoverflow.com/questions/10558465/memcached-vs-redis 简单来说: redis :支持的数据类型多,读写速度快,支持的单个文件大小要大,可以数据永久化 redis支持: 阅读全文
posted @ 2016-04-29 14:27 wswang 阅读(706) 评论(0) 推荐(0)
摘要: Solution:Either upgrade IBus to version 1.5.11 or add "export IBUS_ENABLE_SYNC_MODE=1" to your ~/.profile, then restart a session.Alternatively, you c 阅读全文
posted @ 2016-04-28 16:38 wswang 阅读(1595) 评论(0) 推荐(0)
摘要: from json_response import JsonResponse, json_response as json_resp 使用的语句如上,其实并不是没有安装,只是需要升级一下 pip install django-json-response --upgrade 阅读全文
posted @ 2016-04-27 23:21 wswang 阅读(2129) 评论(0) 推荐(0)
摘要: 上面的错误是因为元组内容不可更改 下面返回a的值是None是因为shuffle返回值的原因 ,shuffle只是在原基础上做的打乱 阅读全文
posted @ 2016-04-27 17:43 wswang 阅读(281) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/ichuzhen/article/details/38555645 一般建议用datefield 关于从数据库读取出来格式问题可以看 阅读全文
posted @ 2016-04-27 15:37 wswang 阅读(1134) 评论(0) 推荐(0)
摘要: 转http://blog.163.com/tym190@126/blog/static/8776005920143192412477/ 终端输入代码: 在打开文件中找到 GRUB_CMDLINE_LINUX="" 改成 GRUB_CMDLINE_LINUX="acpi_backlight=vendo 阅读全文
posted @ 2016-04-27 13:03 wswang 阅读(3350) 评论(0) 推荐(0)
摘要: DataTimeField()中auto_now参数和auto_now_add参数区别: 前者添加或者修改的都为现在的时间,可以再次更新; 后者仅仅为添加时候的时间,不可更改。 阅读全文
posted @ 2016-04-26 10:12 wswang 阅读(663) 评论(0) 推荐(0)
摘要: from utils.redis.connect import redis_cache as rr.flushdb()列表操作r.lpush("name", xxxx) or r.lpush("name", *xxxx)r.lpop("name")r.llen("name")集合操作r.sset(k 阅读全文
posted @ 2016-04-25 18:56 wswang 阅读(674) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 28 下一页