您的位置:首页 > 产品设计 > UI/UE

Advanced Models(The Definitive Guild to Django)

2010-03-31 09:36 459 查看
  In short, a model’s manager is an object through which Django models perform database queries. Each Django model has at least one manager, and you can create custom managers to customize database access. There are two reasons you might want to create a custom manager: to add extra manager methods, and/or to modify the initial QuerySet the manager returns.  Adding extra manager methods is the preferred way to add table-level functionality to your models. A table-level function is one that acts on multiple instances of models, as opposed to single instances.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: