随笔分类 - Django
Yet another python web framework.
It has the easiest and laziest UI-able CMS for users to handle data structure.
摘要:Nginx is so good at delivering requests to many others. Good!Now let's use the nginx upstream module to finish this.http://nginx.org/en/docs/http/ngx_...
阅读全文
摘要:There is a project which is deployed within django. So its authentication system is built from Django itself.But ususually we want to get good use of it. And we don't want to build another system to manage 'user' information.So, we can use django within tornado. I mean use tornado more.W
阅读全文
摘要:I spent several days on building a system about this. And make it work well with serveral thousand lines of codes.
阅读全文
摘要:现在,我们用torndo做web开发框架,用他内部机制来处理HTTP请求。传说中的非阻塞式服务。整来整去,可谓之一波三折。可是,无论怎么样,算是被我做成功了。在tornado服务上,采用三种数据库模型--》1)torndb2)django model3)SQLAlchemy model 都同时输出相应的JSON,做API服务。(一个比一个强大的ORM model)都同时实现了一样的功能注意:要说明的一点是,在数据库建立模型的时候,是用到的django model建立的数据库模型。所以在使用torndb(SQL 操作语言的ORM) 和 django model的时候,非常简单操作,直接引用...
阅读全文
摘要:django的模型from django.db import models""" A model pair to map car and its manufacturer"""class Manufacturer(models.Model): brand = models.CharField(max_length=100) location = models.CharField(max_length=100) def __unicode__(self): return self.brand class Meta: ordering =
阅读全文
摘要:django User model operationthis tutorial will guide us to know how to manipulate django User model.Read User object derived from databasefrom django.contrib.auth.models import User# Those two lines are different even if there is only one user 'admin' who registered beforeauser = User.objects
阅读全文
摘要:Read by linux/GNU commandsLet's follow and start from here:http://django-tastypie.readthedocs.org/en/latest/tutorial.html#creating-resourcesAccording to tastypie's concept, Tastypie properly handles the Accept header.So we can use linux/GNU commands to do some fancy things!Bash script to get
阅读全文
摘要:tastypie is a good thing.Haven't test it thoroughly. Gonna need some provement.Now I will introduct how to use tastepie for newbies.Let me introduce all the equipments I have to deploy tastypie.1) linuxmint 132) virtualenv ( sudo apt-get install python-virtualenv )3) install django==1.5 in the v
阅读全文
摘要:Its one of the primary authors' lecture on pyCon: http://www.youtube.com/watch?v=Zv26xHYlc8s&noredirect=1What is Tastypie A REST framework for django Designed for extension Supports both Model & non-Model datafor more information, please visit http://tastypieapi.org1) make good use of HT
阅读全文
摘要:dango, 怎么说呢,什么东西都内置了,什么东西都是自己的东西。用过flask, cherrypy, web.py, pyramid 等等python 框架后,再选用dango 觉得,理念有很大的区别。藏着掖着的嫌疑比较大,高度封装,但是操作起来貌似省事情。时间久了会不会python的标准库不知道怎么用了,呵呵~这里一些简单的资料也许挺有用的。http://django-chinese-docs.readthedocs.org/en/latest/intro/tutorial01.htmlhttp://django-chinese-docs.readthedocs.org/en/latest
阅读全文