Adds managers for reverse names of many to many relationships in the contrib.auth app.
This is a small QoL improvement PR. It provides type checkers with the reverse relationships between:
Group and Permission: Permission has a typed .group_set manager object
PermissionMixin and Group: Group has a typed .user_set manager object
The reasons for using PermissionMixin rather than other possible models/mixins are (1) the relationship is defined in the mixin to begin with, and (2) this is compatible with any model that inherits the mixin - e.g. AbstractUser, User, or a custom user model.
Adds managers for reverse names of many to many relationships in the contrib.auth app.
This is a small QoL improvement PR. It provides type checkers with the reverse relationships between:
.group_set
manager object.user_set
manager objectThe reasons for using PermissionMixin rather than other possible models/mixins are (1) the relationship is defined in the mixin to begin with, and (2) this is compatible with any model that inherits the mixin - e.g. AbstractUser, User, or a custom user model.