- 抽象继承(不产生实际表)
class ModelName:
...
class Meta:
abstract = True
-
实际继承
-
代理继承 只在Python层级父子类有不同表现,数据库表为同一张
class ParentName:
...
class ChildName:
...
class Meta:
proxy = True
def custom_method():
...
child_name_object.custom_method()
Logger -> Filter -> Handler -> Formatter
Debug, Info, Warning, Error, Critical
单个视图函数的数据库操作全部会被包装在一个事务中