get_permission_codename
Return the codename of the permission for the specified action.
def get_permission_codename(
action: string,
opts: object
) - > string
Return the codename of the permission for the specified action.
Parameters
| Name | Type | Description |
|---|---|---|
| action | string | The specific action or verb for the permission, such as 'add', 'change', or 'delete'. |
| opts | object | An options object containing metadata about the model, specifically requiring a 'model_name' attribute. |
Returns
| Type | Description |
|---|---|
string | The formatted permission string combining the action and the model name, typically used for Django-style permission checks. |