티스토리 수익 글 보기
지원이 중단된 Django 버전의 문서입니다. 새 릴리스로 업그레이드하세요!
Skip to main content
Model class reference¶
This document covers features of the Model class.
For more information about models, see the complete list of Model
reference guides.
Attributes¶
objects¶
-
Model.objects¶ Each non-abstract
Modelclass must have aManagerinstance added to it. Django ensures that in your model class you have at least a defaultManagerspecified. If you don’t add your ownManager, Django will add an attributeobjectscontaining defaultManagerinstance. If you add your ownManagerinstance attribute, the default one does not appear. Consider the following example:from django.db import models class Person(models.Model): # Add manager with another name people = models.Manager()
For more details on model managers see Managers and Retrieving objects.
추가 정보
Support Django!
목차
도움말
- 자주 묻는 질문
- 공통적인 질문에 대한 답을 FAQ에서 찾아보세요.
- 색인, 모듈 색인, or 목차
- 특정한 주제에 대한 정보를 찾는데 유용합니다.
- Django Discord Server
- Join the Django Discord Community.
- Official Django Forum
- Join the community on the Django Forum.
- Ticket tracker
- 티켓 트래커를 통해 Django 혹은 Django 문서의 버그를 신고해주세요.
다운로드:
오프라인(Django 2.0):
HTML |
PDF |
ePub
Read the Docs 제공.