MCPcopy
hub / github.com/django/django / as_manager

Method as_manager

django/db/models/query.py:360–366  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

358 self._query = value
359
360 def as_manager(cls):
361 # Address the circular dependency between `Queryset` and `Manager`.
362 from django.db.models.manager import Manager
363
364 manager = Manager.from_queryset(cls)()
365 manager._built_with_as_manager = True
366 return manager
367
368 as_manager.queryset_only = True
369 as_manager = classmethod(as_manager)

Callers 15

construct_managersMethod · 0.80
TeacherClass · 0.80
IndexErrorArticleClass · 0.80
AutodetectorTestsClass · 0.80
set_up_test_modelMethod · 0.80
FoodClass · 0.80
FoodClass · 0.80

Calls 1

from_querysetMethod · 0.80