... gth = 1 , choices = { "A" : _ ( "Author" ), "E" : _ ( "Editor" )}) people = models . Manager () authors = AuthorManager () editors = EditorManager () この例では、 Person.authors.all() 、 Person.editors.all() 、 Person.people.all() を指定でき、期待通りの ... る必要があります: class PersonQuerySet ( models . QuerySet ): def authors ( self ): return self . filter ( role = "A" ) def editors ( self ): return self . filter ( role = "E" ) class PersonManager ( models . Manager ): def get_queryset ( self ): return ... PersonQuerySet ( self . model , using = self . _db ) def authors ( self ): return self . get_queryset () . authors () def editors ( self ): return self . get_queryset () . editors () class Person ( models . Model ): first_name = models . CharField ( ma ... ... hors.html {% block content %} < h2 > Authors </ h2 > {% for user in authors %} {% partial user-info %} {% endfor %} < h2 > Editors </ h2 > {% for user in editors %} {% partial user-info %} {% endfor %} {% endblock %} The partial content is rendered each ... ... rators has the advantage that these options are more discoverable as they can be suggested by completion utilities in code editors. They are merely a convenience and still set the same attributes on the functions under the hood. マイナーな機能 django.co ... ... グループに属することが可能です。 グループに属するユーザーは、そのグループに付与された権限を自動的に持ちます。たとえば、 Site editors グループが can_edit_home_page 権限を持っていた場合、そのグループ内のすべてのユーザーは、その権限を持つことになります。 権限 ... 2026年10月08日