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
241e1e3c
Kaydet (Commit)
241e1e3c
authored
Ock 09, 2017
tarafından
Maxime Lorant
Kaydeden (comit)
Tim Graham
Ock 09, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed SHOUTING in doc examples.
üst
823af53b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
models.txt
docs/topics/db/models.txt
+2
-4
queries.txt
docs/topics/db/queries.txt
+1
-1
No files found.
docs/topics/db/models.txt
Dosyayı görüntüle @
241e1e3c
...
...
@@ -513,11 +513,9 @@ the intermediate model::
Unlike normal many-to-many fields, you *can't* use ``add()``, ``create()``,
or ``set()`` to create relationships::
>>> # T
HIS WILL NOT WORK
>>> # T
he following statements will not work
>>> beatles.members.add(john)
>>> # NEITHER WILL THIS
>>> beatles.members.create(name="George Harrison")
>>> # AND NEITHER WILL THIS
>>> beatles.members.set([john, paul, ringo, george])
Why? You can't just create a relationship between a ``Person`` and a ``Group``
...
...
@@ -539,7 +537,7 @@ information as to which intermediate model instance should be deleted::
... invite_reason="You've been gone for a month and we miss you.")
>>> beatles.members.all()
<QuerySet [<Person: Ringo Starr>, <Person: Paul McCartney>, <Person: Ringo Starr>]>
>>> # T
HIS WILL NOT WORK BECAUSE IT CANNOT TELL WHICH MEMBERSHIP TO REMOVE
>>> # T
his will not work because it cannot tell which membership to remove
>>> beatles.members.remove(ringo)
However, the :meth:`~django.db.models.fields.related.RelatedManager.clear`
...
...
docs/topics/db/queries.txt
Dosyayı görüntüle @
241e1e3c
...
...
@@ -1059,7 +1059,7 @@ introduce joins when you use ``F()`` objects in an update -- you can only
reference fields local to the model being updated. If you attempt to introduce
a join with an ``F()`` object, a ``FieldError`` will be raised::
# T
HIS WILL RAISE A
FieldError
# T
his will raise a
FieldError
>>> Entry.objects.update(headline=F('blog__name'))
.. _topics-db-queries-related:
...
...
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