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
12cb0df1
Kaydet (Commit)
12cb0df1
authored
Haz 27, 2013
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Docs for related_query_name
üst
b21e96d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
fields.txt
docs/ref/models/fields.txt
+22
-0
No files found.
docs/ref/models/fields.txt
Dosyayı görüntüle @
12cb0df1
...
...
@@ -1083,6 +1083,22 @@ define the details of how the relation works.
user = models.ForeignKey(User, related_name='+')
.. attribute:: ForeignKey.related_query_name
.. versionadded:: 1.6
The name to use for the reverse filter name from the target model.
Defaults to the value of :attr:`related_name` if it is set, otherwise it
defaults to the name of the model::
# Declare the ForeignKey with related_query_name
class Tag(models.Model):
article = models.ForeignKey(Article, related_name="tags", related_query_name="tag")
name = models.CharField(max_length=255)
# That's now the name of the reverse filter
article_instance.filter(tag__name="important")
.. attribute:: ForeignKey.to_field
The field on the related object that the relation is to. By default, Django
...
...
@@ -1207,6 +1223,12 @@ that control how the relationship functions.
users = models.ManyToManyField(User, related_name='u+')
referents = models.ManyToManyField(User, related_name='ref+')
.. attribute:: ForeignKey.related_query_name
.. versionadded:: 1.6
Same as :attr:`ForeignKey.related_query_name`.
.. attribute:: ManyToManyField.limit_choices_to
Same as :attr:`ForeignKey.limit_choices_to`.
...
...
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