auth.models.PermissionsMixin.has_perm()

has_perm(perm, obj=None)

Returns True if the user has the specified permission, where perm is in the format "<app label>.<permission codename>" (see permissions). If the user is inactive, this method will always return False.

If obj is passed in, this method won’t check for a permission for the model, but for this specific object.

doc_Django
2016-10-09 18:34:21
Comments
Leave a Comment

Please login to continue.