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
e88723ac
Kaydet (Commit)
e88723ac
authored
Tem 01, 2014
tarafından
Éric Araujo
Kaydeden (comit)
Tim Graham
Tem 02, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[1.7.x] Removed non-existent reference to args/kwargs in manager docs.
Backport of
5842d8eb
from master
üst
bbba492f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
managers.txt
docs/topics/db/managers.txt
+2
-5
No files found.
docs/topics/db/managers.txt
Dosyayı görüntüle @
e88723ac
...
...
@@ -300,9 +300,6 @@ returns a *subclass* of your base ``Manager`` with a copy of the custom
``QuerySet`` methods::
class BaseManager(models.Manager):
def __init__(self, *args, **kwargs):
...
def manager_only_method(self):
return
...
...
@@ -311,14 +308,14 @@ returns a *subclass* of your base ``Manager`` with a copy of the custom
return
class MyModel(models.Model):
objects = BaseManager.from_queryset(CustomQueryset)(
*args, **kwargs
)
objects = BaseManager.from_queryset(CustomQueryset)()
You may also store the generated class into a variable::
CustomManager = BaseManager.from_queryset(CustomQueryset)
class MyModel(models.Model):
objects = CustomManager(
*args, **kwargs
)
objects = CustomManager()
.. _custom-managers-and-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