Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ManyToManyRelatedManager to auth models (#235)
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. <img width="759" alt="Screenshot 2024-04-19 at 10 34 19 AM" src="https://github.com/sbdchd/django-types/assets/4360430/40dc3ce6-fd5a-4c7f-8318-5bbff80c5b9f">
- Loading branch information