warn_about_external_use
Issue a warning when a deprecated feature is used outside of Django.
def warn_about_external_use(
message: string,
category: Warning,
skip_name_prefixes: string | tuple[string] = None,
skip_frames: int = 0,
internal_modules: tuple[string] = None
)
Issue a warning when a deprecated feature is used outside of Django. Skip the warning when called from within Django, to avoid cascading warnings when one deprecated feature is implemented on top of another.
Parameters
| Name | Type | Description |
|---|---|---|
| message | string | The warning message text to display to the user. |
| category | Warning | The warning class category (e.g., DeprecationWarning) to issue. |
| skip_name_prefixes | `string | tuple[string]` = None |
| skip_frames | int = 0 | A fixed number of additional stack frames to skip, such as decorators or shared helper functions, applied after skip_name_prefixes. |
| internal_modules | tuple[string] = None | A tuple of module names used to define the internal boundary; defaults to ('django',). |