Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
5b185ecc
Kaydet (Commit)
5b185ecc
authored
May 16, 2014
tarafından
Aliaksandr Semianiuk
Kaydeden (comit)
Tim Graham
May 17, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22019 -- Added Model.objects reference documentation.
üst
a2dd618e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
5 deletions
+44
-5
index.txt
docs/index.txt
+2
-1
class.txt
docs/ref/models/class.txt
+35
-0
index.txt
docs/ref/models/index.txt
+1
-0
models.txt
docs/topics/db/models.txt
+3
-2
queries.txt
docs/topics/db/queries.txt
+3
-2
No files found.
docs/index.txt
Dosyayı görüntüle @
5b185ecc
...
@@ -61,7 +61,8 @@ manipulating the data of your Web application. Learn more about it below:
...
@@ -61,7 +61,8 @@ manipulating the data of your Web application. Learn more about it below:
* **Models:**
* **Models:**
:doc:`Model syntax <topics/db/models>` |
:doc:`Model syntax <topics/db/models>` |
:doc:`Field types <ref/models/fields>` |
:doc:`Field types <ref/models/fields>` |
:doc:`Meta options <ref/models/options>`
:doc:`Meta options <ref/models/options>` |
:doc:`Model class <ref/models/class>`
* **QuerySets:**
* **QuerySets:**
:doc:`Executing queries <topics/db/queries>` |
:doc:`Executing queries <topics/db/queries>` |
...
...
docs/ref/models/class.txt
0 → 100644
Dosyayı görüntüle @
5b185ecc
=====================
Model class reference
=====================
.. currentmodule:: django.db.models
This document covers features of the :class:`~django.db.models.Model` class.
For more information about models, see :doc:`the complete list of Model
reference guides </ref/models/index>`.
Attributes
==========
``objects``
-----------
.. attribute:: Model.objects
Each non-abstract :class:`~django.db.models.Model` class must have a
:class:`~django.db.models.Manager` instance added to it.
Django ensures that in your model class you have at least a
default ``Manager`` specified. If you don't add your own ``Manager``,
Django will add an attribute ``objects`` containing default
:class:`~django.db.models.Manager` instance. If you add your own
:class:`~django.db.models.Manager` instance 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 :doc:`Managers </topics/db/managers>`
and :ref:`Retrieving objects <retrieving-objects>`.
docs/ref/models/index.txt
Dosyayı görüntüle @
5b185ecc
...
@@ -9,6 +9,7 @@ Model API reference. For introductory material, see :doc:`/topics/db/models`.
...
@@ -9,6 +9,7 @@ Model API reference. For introductory material, see :doc:`/topics/db/models`.
fields
fields
relations
relations
class
options
options
instances
instances
querysets
querysets
...
...
docs/topics/db/models.txt
Dosyayı görüntüle @
5b185ecc
...
@@ -681,8 +681,9 @@ Model attributes
...
@@ -681,8 +681,9 @@ Model attributes
:class:`~django.db.models.Manager`. It's the interface through which
:class:`~django.db.models.Manager`. It's the interface through which
database query operations are provided to Django models and is used to
database query operations are provided to Django models and is used to
:ref:`retrieve the instances <retrieving-objects>` from the database. If no
:ref:`retrieve the instances <retrieving-objects>` from the database. If no
custom ``Manager`` is defined, the default name is ``objects``. Managers
custom ``Manager`` is defined, the default name is
are only accessible via model classes, not the model instances.
:attr:`~django.db.models.Model.objects`. Managers are only accessible via
model classes, not the model instances.
.. _model-methods:
.. _model-methods:
...
...
docs/topics/db/queries.txt
Dosyayı görüntüle @
5b185ecc
...
@@ -146,8 +146,9 @@ and a filter is a limiting clause such as ``WHERE`` or ``LIMIT``.
...
@@ -146,8 +146,9 @@ and a filter is a limiting clause such as ``WHERE`` or ``LIMIT``.
You get a :class:`~django.db.models.query.QuerySet` by using your model's
You get a :class:`~django.db.models.query.QuerySet` by using your model's
:class:`~django.db.models.Manager`. Each model has at least one
:class:`~django.db.models.Manager`. Each model has at least one
:class:`~django.db.models.Manager`, and it's called ``objects`` by
:class:`~django.db.models.Manager`, and it's called
default. Access it directly via the model class, like so::
:attr:`~django.db.models.Model.objects` by default. Access it directly via the
model class, like so::
>>> Blog.objects
>>> Blog.objects
<django.db.models.manager.Manager object at ...>
<django.db.models.manager.Manager object at ...>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment