随笔分类 -  Django REST framework

Ubuntu 忘记密码后重置密码
摘要:摘自百度贴吧:http://tieba.baidu.com/p/2869755075选后会再出现一个选单,让你选取,请选取:root - Drop to root shell prompt选完后,下方会出现文字模式,可以键入指令。这时候,你是root超级使用者。所以你的指令不须加sudo(但请小心,... 阅读全文

posted @ 2015-02-16 23:18 数学之道 阅读(303) 评论(0) 推荐(0)

Django mysql 字符集问题
摘要:http://www.cnblogs.com/discuss/articles/1862248.htmlhttp://www.cnblogs.com/moinmoin/archive/2011/02/15/dj_incorrect_string_value.htmlCREATE DATABASE o... 阅读全文

posted @ 2014-10-28 15:51 数学之道 阅读(501) 评论(0) 推荐(0)

Django 资源文件配置
摘要:staticfiles: 这是一个静态资源管理的app,django.contrib.staticfiles。老的版本中,静态资源管理一直是一个问题,部分app发布的时候 需要带上静态资源,在部署的时候必须将每个app存在的static静态资源复制到同一个static目录。引入staticfiles... 阅读全文

posted @ 2014-09-27 21:42 数学之道 阅读(325) 评论(0) 推荐(0)

ubuntu 部署Django
摘要:1, 安装python包管理工具easy_install。sudo apt-get install python-setuptools2,安装Django。 sudo easy_install "django==1.6"3,安装C/C++库和编译器。 sudo apt-getinstall gc... 阅读全文

posted @ 2014-09-27 14:25 数学之道 阅读(325) 评论(0) 推荐(0)

6,视图和路由
摘要:REST framework includes an abstraction for dealing with ViewSets, that allows the developer to concentrate on modeling the state and interactions of t... 阅读全文

posted @ 2014-05-29 13:23 数学之道 阅读(271) 评论(0) 推荐(0)

5,基于关系和超链接的 API
摘要:Tutorial 5: Relationships & Hyperlinked APIsAt the moment relationships within our API are represented by using primary keys. In this part of the tuto... 阅读全文

posted @ 2014-05-29 11:31 数学之道 阅读(693) 评论(0) 推荐(0)

4,认证和授权
摘要:Currently our API doesn't have any restrictions on who can edit or delete code snippets. We'd like to have some more advanced behavior in order to mak... 阅读全文

posted @ 2014-05-28 14:10 数学之道 阅读(365) 评论(0) 推荐(0)

3,基于类的视图函数
摘要:We can also write our API views using class based views, rather than function based views. As we'll see this is a powerful pattern that allows us to r... 阅读全文

posted @ 2014-05-27 16:12 数学之道 阅读(345) 评论(0) 推荐(0)

2,请求和响应
摘要:From this point we're going to really start covering the core of REST framework. Let's introduce a couple of essential building blocks.从现在起,我们将开始接触 RE... 阅读全文

posted @ 2014-05-27 15:35 数学之道 阅读(426) 评论(0) 推荐(0)

1,序列化
摘要:介绍该教程将会让你理解 REST 框架的各个组件是怎么工作的。该教程很深入,你可能需要取饼干和你喜欢的饮料。如果你想快速的浏览,你应该去看 quickstart 。注意:该教程对应的代码可以去GitHub看, tomchristie/rest-framework-tutorial 。完整的实现作为测... 阅读全文

posted @ 2014-05-27 13:40 数学之道 阅读(604) 评论(0) 推荐(0)

0,快速教程
摘要:QuickstartWe're going to create a simple API to allow admin users to view and edit the users and groups in the system.我们将建立一个简单的API例子,只有超级用户admin才能查看和... 阅读全文

posted @ 2014-05-27 10:40 数学之道 阅读(307) 评论(0) 推荐(0)

导航