This file contains hidden or 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
| from django.contrib.auth.models import Permission | |
| from django.contrib.contenttypes.models import ContentType | |
| from myapp.models import MyModel | |
| content_type = ContentType.objects.get_for_model(MyModel) | |
| permissions = Permission.objects.filter(content_type=content_type) |