diff --git a/django-stubs/db/models/__init__.pyi b/django-stubs/db/models/__init__.pyi index f9bd66e..1e10126 100644 --- a/django-stubs/db/models/__init__.pyi +++ b/django-stubs/db/models/__init__.pyi @@ -68,6 +68,9 @@ from .deletion import ( DO_NOTHING as DO_NOTHING, PROTECT as PROTECT, SET as SET, + RESTRICT as RESTRICT, + ProtectedError as ProtectedError, + RestrictedError as RestrictedError, ) from .query import ( diff --git a/django-stubs/db/models/deletion.pyi b/django-stubs/db/models/deletion.pyi index 6bc0069..061e5b7 100644 --- a/django-stubs/db/models/deletion.pyi +++ b/django-stubs/db/models/deletion.pyi @@ -11,10 +11,12 @@ def SET_NULL(collector, field, sub_objs, using): ... def SET_DEFAULT(collector, field, sub_objs, using): ... def DO_NOTHING(collector, field, sub_objs, using): ... def PROTECT(collector, field, sub_objs, using): ... +def RESTRICT(collector, field, sub_objs, using): ... def SET(value: Any) -> Callable: ... def get_candidate_relations_to_delete(opts: Options) -> Iterable[Field]: ... class ProtectedError(IntegrityError): ... +class RestrictedError(IntegrityError): ... class Collector: def __init__(self, using: str) -> None: ...