Skip to main content

update_proxy_model_permissions

Update the content_type of proxy model permissions to use the ContentType of the proxy model.

def update_proxy_model_permissions(
apps: django.apps.registry.Apps,
schema_editor: django.db.backends.base.schema.BaseDatabaseSchemaEditor,
reverse: boolean = False
) - > null

Update the content_type of proxy model permissions to use the ContentType of the proxy model.

Parameters

NameTypeDescription
appsdjango.apps.registry.AppsThe registry containing the models for the current migration state.
schema_editordjango.db.backends.base.schema.BaseDatabaseSchemaEditorThe database abstraction layer used to apply schema changes.
reverseboolean = FalseIf True, reverts the permissions to point back to the concrete model's ContentType instead of the proxy's.

Returns

TypeDescription
nullNone