티스토리 수익 글 보기
Acuan kelas model¶
This document covers features of the Model class.
For more information about models, see the complete list of Model
reference guides.
Atribut¶
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()
Untuk rincian lebih pada pengelola model lihat Managers and Retrieving objects.
Informasi Tambahan
Support Django!
Isi
Mendapatkan bantuan
- FAQ
- Coba FAQ — yang menjawab banyak pertanyaan-pertanyaan umum.
- Indeks, Indeks Modul, or Daftar Isi
- Mudah digunakan untuk mencari informasi yang lebih spesifik.
- Django Discord Server
- Join the Django Discord Community.
- Official Django Forum
- Join the community on the Django Forum.
- Ticket tracker
- Laporkan kesalahan pada Django atau Dokumentasi Django pada pelacak tiket kami.
Unduh:
Offline(Django 2.2):
HTML |
PDF |
ePub
Disediakan oleh Read the Docs.