摘要:
ManyToMany参数((through,db_constraint)) class Book(models.Model): name=models.CharField(max_length=20) authors=models.ManyToMany('Author',through='Score 阅读全文
摘要:
装饰器 装饰器:写代码要遵循开放封闭原则,装饰器本质是一个嵌套函数(被套着的函数就是闭包),它可以让被装饰函数在不需要做任何代码变动的前提下增加额外功能,装饰器的返回值也是一个函数对象。 加载顺序自下而上,执行顺序自上而下 @classmethod,@staticmethod,@property,@ 阅读全文