04 2017 档案

配置linux下面python的开发环境
摘要:1、首先安装Python开发环境 http://blog.csdn.net/testcs_dn/article/details/51253365 2、安装django开发环境 http://blog.csdn.net/cq361106306/article/details/41892419 阅读全文

posted @ 2017-04-28 16:03 黑加仑妞 阅读(123) 评论(0) 推荐(0)

strftime()和strptime的区别
摘要:strftime()是把时间转成规定格式的字符串 strptime()是把字符串转成时间 转载:http://blog.csdn.net/caimouse/article/details/50198695 阅读全文

posted @ 2017-04-24 19:30 黑加仑妞 阅读(332) 评论(0) 推荐(0)

django保存一个object的时候会发出信号
摘要:当django保存一个object的时候会发出一系列的signals,可以通过对这些signals注册listener,从而相应的signal发出时执行一定的代码。 from django.core.signals import post_save from django.dispatch impo 阅读全文

posted @ 2017-04-24 18:32 黑加仑妞 阅读(91) 评论(0) 推荐(0)

转:django在生成数据库时常常遇到的问题
摘要:真的很有用! http://blog.csdn.net/pipisorry/article/details/45727309 阅读全文

posted @ 2017-04-21 15:46 黑加仑妞 阅读(93) 评论(0) 推荐(0)

转发一篇关于django模型详解的一篇好的博客
摘要:http://blog.csdn.net/pipisorry/article/details/45725953 阅读全文

posted @ 2017-04-21 13:05 黑加仑妞 阅读(85) 评论(0) 推荐(0)

关于RESTFUL的理解
摘要:1、什么是REST REST全称是Representtatinal State Transfer,中文意思是表述性状态转移。如果一个架构符合REST的约束条件和原则,我们就称它为RESTful架构。这个架构并没有什么新的技术,其实就是对现有的web标准的一个更好的总结。但是理论上REST架构风格并不 阅读全文

posted @ 2017-04-13 17:10 黑加仑妞 阅读(151) 评论(0) 推荐(0)

Django Rest Framework - Could not resolve URL for hyperlinked relationship using view name “user-detail”
摘要:要把跟当前表相关的viewset定义出来 http://stackoverflow.com/questions/20550598/django-rest-framework-could-not-resolve-url-for-hyperlinked-relationship-using 阅读全文

posted @ 2017-04-12 15:39 黑加仑妞 阅读(637) 评论(0) 推荐(0)

Django-rest-framework多条件查询/分页/多表Json
摘要:http://www.mamicode.com/info-detail-1648765.html 阅读全文

posted @ 2017-04-11 16:14 黑加仑妞 阅读(752) 评论(0) 推荐(0)

Django: TemplateDoesNotExist (rest_framework/api.html)
摘要:需要在站点前面的INSTALLED_APP里面加上rest_framework 阅读全文

posted @ 2017-04-07 18:31 黑加仑妞 阅读(446) 评论(0) 推荐(0)

更新pip
摘要:python -m pip install pip --upgrade pip要保持最新的,才可以去下载最新的其他的第三方包 阅读全文

posted @ 2017-04-07 13:20 黑加仑妞 阅读(83) 评论(0) 推荐(0)

datetimefield和datefield的区别
摘要:django创建关于时间的model时,有三个可选,datetimefield、datefield和timefield,这三个分别对应datetime、date、time对象,这三个对象都有共同的属性auto_now和auto_now_add,这两个属性的区别就是,前者会在每次存储的时候更新当前时间 阅读全文

posted @ 2017-04-01 11:12 黑加仑妞 阅读(960) 评论(0) 推荐(0)

model里面字段choices的values值的选择
摘要:代码如下: Model: 阅读全文

posted @ 2017-04-01 10:17 黑加仑妞 阅读(643) 评论(0) 推荐(0)