Created
December 17, 2019 17:03
-
-
Save jdesilvio/bd26174d6a346a1c5b411f7706b0f51f to your computer and use it in GitHub Desktop.
Get all permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groups = Group.objects.all() | |
for group in groups: | |
for perm in group.permissions.all(): | |
self.logger.info("%s|%s|%s", group.name, perm.name, perm.codename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment