def get_permission_object_from_string(permission_string):
 (app_label, codename) = permission_string.split('.')
 return Permission.objects.get(content_type__app_label=app_label, codename=codename)

def get_permission_object_from_string ( permission_string ) : ( app_label , codename ) = permission_string . split ( '.' ) return Permission . objects . get ( content_type__app_label = app_label , codename = codename )
given a permission string of the form app_label .