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
9d7e2c7b
Kaydet (Commit)
9d7e2c7b
authored
Nis 09, 2018
tarafından
Luoxzhg
Kaydeden (comit)
Tim Graham
Nis 10, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed mistakes in docs/topics/db/examples/many_to_one.txt.
üst
65c44a5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
many_to_one.txt
docs/topics/db/examples/many_to_one.txt
+2
-2
No files found.
docs/topics/db/examples/many_to_one.txt
Dosyayı görüntüle @
9d7e2c7b
...
...
@@ -76,7 +76,7 @@ Create an Article via the Reporter object::
Create a new article, and add it to the article set::
>>> new_article2 = Article(headline="Paul's story", pub_date=date(2006, 1, 17))
>>> new_article2 = Article
.objects.create
(headline="Paul's story", pub_date=date(2006, 1, 17))
>>> r.article_set.add(new_article2)
>>> new_article2.reporter
<Reporter: John Smith>
...
...
@@ -98,7 +98,7 @@ Adding an object of the wrong type raises TypeError::
>>> r.article_set.add(r2)
Traceback (most recent call last):
...
TypeError: 'Article' instance expected
TypeError: 'Article' instance expected
, got <Reporter: Paul Jones>
>>> r.article_set.all()
<QuerySet [<Article: John's second story>, <Article: This is a test>]>
...
...
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