def get_user_permission_full_codename(perm):
 User = get_user_model()
 model_name = User._meta.model_name
 return (u'%s.%s_%s' % (User._meta.app_label, perm, model_name))

def get_user_permission_full_codename ( perm ) : User = get_user_model ( ) model_name = User . _meta . model_name return ( u'%s.%s_%s' % ( User . _meta . app_label , perm , model_name ) )
returns app_label .