From 4bd494db42cbe7ab8dc212dd5986ba3532488138 Mon Sep 17 00:00:00 2001 From: Gagaro Date: Wed, 16 Mar 2022 16:04:51 +0100 Subject: [PATCH] Made BaseConstraint importable from django.db.models. --- django/contrib/postgres/constraints.py | 3 +-- django/db/models/constraints.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/django/contrib/postgres/constraints.py b/django/contrib/postgres/constraints.py index 07dbc8cda1..fa62379f67 100644 --- a/django/contrib/postgres/constraints.py +++ b/django/contrib/postgres/constraints.py @@ -3,8 +3,7 @@ import warnings from django.contrib.postgres.indexes import OpClass from django.db import NotSupportedError from django.db.backends.ddl_references import Expressions, Statement, Table -from django.db.models import Deferrable, F, Q -from django.db.models.constraints import BaseConstraint +from django.db.models import BaseConstraint, Deferrable, F, Q from django.db.models.expressions import ExpressionList from django.db.models.indexes import IndexExpression from django.db.models.sql import Query diff --git a/django/db/models/constraints.py b/django/db/models/constraints.py index 721e43ae58..3577c638ef 100644 --- a/django/db/models/constraints.py +++ b/django/db/models/constraints.py @@ -5,7 +5,7 @@ from django.db.models.indexes import IndexExpression from django.db.models.query_utils import Q from django.db.models.sql.query import Query -__all__ = ["CheckConstraint", "Deferrable", "UniqueConstraint"] +__all__ = ["BaseConstraint", "CheckConstraint", "Deferrable", "UniqueConstraint"] class BaseConstraint: