def get_execute_data(self): ContentType = apps.get_model(app_label='contenttypes', model_name='ContentType') content_type = ContentType.objects.get( pk=self.form_data['content_type']) self.obj = content_type.get_object_for_this_type( pk=self.form_data['object_id']) self.roles = Role.objects.filter(pk__in=self.form_data['roles']) self.permissions = [ Permission.get(pk=permission, class_only=True) for permission in self.form_data['permissions'] ]
def get_execute_data(self): self.roles = Role.objects.filter(pk__in=self.form_data['roles']) self.permissions = [ Permission.get(pk=permission, class_only=True) for permission in self.form_data['permissions'] ]