摘要: 1.一般操作 <1> all(): 查询所有结果 <2> filter(**kwargs): 它包含了与所给筛选条件相匹配的对象 <3> get(**kwargs): 返回与所给筛选条件相匹配的对象,返回结果有且只有一个,如果符合筛选条件的对象超过一个或者没有都会抛出错误。 <4> exclude( 阅读全文
posted @ 2019-04-16 21:38 寒~轩 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1.反射练习 import sys class Person(object): def __init__(self, name): self.name = name def eat(self, food): print("{} 在吃 {}".format(self.name, food)) def 阅读全文
posted @ 2019-04-16 10:42 寒~轩 阅读(91) 评论(0) 推荐(0) 编辑