摘要: 参考资料: How to get started, and achieve tasks, using Kubernetes:http://kubernetes.io/docs/getting-started-guides/ubuntu/ How to get started, and achieve 阅读全文
posted @ 2016-03-28 16:45 junneyang 阅读(239) 评论(1) 推荐(0) 编辑
摘要: OpenResty最佳实践 在2012年的时候,我加入到奇虎360公司,为新的产品做技术选型。由于之前一直混迹在python圈子里面,也接触过nginx c模块的高性能开发,一直想找到一个兼备python快速开发和nginx c模块高性能的产品。看到OpenResty后,有发现新大陆的感觉。 于是我 阅读全文
posted @ 2016-03-28 15:07 junneyang 阅读(844) 评论(0) 推荐(0) 编辑
摘要: MaxLeap 2016-03-25 13:53 MaxLeap 2016-03-25 13:53 上篇文章介绍了微服务和单体架构的区别、微服务的设计、消息、服务间通信、数据去中心化,本篇会继续深入微服务,介绍其它特性。 治理去中心化 通常“治理”的意思是构建方案,并且迫使人们通过努力达到组织的目标 阅读全文
posted @ 2016-03-28 14:12 junneyang 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 微服务实战:从发布到架构——上篇 MaxLeap 2016-03-23 10:42 微服务实战:从发布到架构——上篇 MaxLeap 2016-03-23 10:42 “微服务”是当前软件架构领域非常热门的词汇,能找到很多关于微服务的定义、准则,以及如何从微服务中获益的文章,在企业的实践中去应用“微 阅读全文
posted @ 2016-03-28 14:11 junneyang 阅读(635) 评论(0) 推荐(0) 编辑
摘要: from django.db.models import QItem.objects.filter(Q(creator=owner) | Q(moderated=False)) 代码示例: 参考资料: http://stackoverflow.com/questions/739776/django- 阅读全文
posted @ 2016-03-28 12:04 junneyang 阅读(3385) 评论(0) 推荐(0) 编辑
摘要: 使用示例1.创建用户>>> from django.contrib.auth.models import User>>> user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword')# At this 阅读全文
posted @ 2016-03-28 11:41 junneyang 阅读(1423) 评论(0) 推荐(0) 编辑
摘要: A ReSTful API is becoming a standard component of any modern web application. The Django Rest Framework is powerful framework for developing ReST endp 阅读全文
posted @ 2016-03-28 09:58 junneyang 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 参考资料: Django Ajax CSRF 认证:http://www.ziqiangxuetang.com/django/django-csrf.html Python Post遇到csrftoken问题 :http://zhidao.baidu.com/link?url=rz3djY2XyPo 阅读全文
posted @ 2016-03-28 09:46 junneyang 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 此文是总结Django官方网站里面的Document的文章 User authentication in Django http://www.djangoproject.com/documentation/authentication/ 该模块由 用户(Users) 权限(Permissions) 阅读全文
posted @ 2016-03-28 09:32 junneyang 阅读(3374) 评论(0) 推荐(0) 编辑
摘要: 按手册和网上的方法在settings.py中设置“SESSION_COOKIE_AGE” 和 “SESSION_EXPIRE_AT_BROWSER_CLOSE” 均不生效。 通过查看django的源代码"middleware.py"才知道这两个参数只有在settings.SESSION_SAVE_E 阅读全文
posted @ 2016-03-28 09:27 junneyang 阅读(1677) 评论(0) 推荐(0) 编辑