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
0ad7e8f7
Kaydet (Commit)
0ad7e8f7
authored
Nis 02, 2017
tarafından
Simon Charette
Kaydeden (comit)
Tim Graham
Nis 02, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28003 -- Doc'd what an auto-created OneToOneField parent_link looks like.
Thanks Simon Charette for the draft patch.
üst
66150f7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
models.txt
docs/topics/db/models.txt
+12
-0
No files found.
docs/topics/db/models.txt
Dosyayı görüntüle @
0ad7e8f7
...
...
@@ -1074,6 +1074,18 @@ created directly as a ``Place`` object or was the parent of some other class),
referring to ``p.restaurant`` would raise a ``Restaurant.DoesNotExist``
exception.
The automatically-created :class:`~django.db.models.OneToOneField` on
``Restaurant`` that links it to ``Place`` looks like this::
place_ptr = models.OneToOneField(
Place, on_delete=models.CASCADE,
parent_link=True,
)
You can override that field by declaring your own
:class:`~django.db.models.OneToOneField` with :attr:`parent_link=True
<django.db.models.OneToOneField.parent_link>` on ``Restaurant``.
.. _meta-and-multi-table-inheritance:
``Meta`` and multi-table inheritance
...
...
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