2016-10-10 22:13:01 +08:00
|
|
|
from django.core.exceptions import ObjectDoesNotExist
|
|
|
|
from django.db.models import signals
|
2015-06-16 02:07:31 +08:00
|
|
|
from django.db.models.aggregates import * # NOQA
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.aggregates import __all__ as aggregates_all
|
2016-11-05 21:12:12 +08:00
|
|
|
from django.db.models.constraints import * # NOQA
|
|
|
|
from django.db.models.constraints import __all__ as constraints_all
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.deletion import (
|
2016-10-10 15:23:35 +08:00
|
|
|
CASCADE, DO_NOTHING, PROTECT, RESTRICT, SET, SET_DEFAULT, SET_NULL,
|
|
|
|
ProtectedError, RestrictedError,
|
2015-06-16 02:07:31 +08:00
|
|
|
)
|
2019-01-01 01:57:35 +08:00
|
|
|
from django.db.models.enums import * # NOQA
|
|
|
|
from django.db.models.enums import __all__ as enums_all
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.expressions import (
|
2017-09-18 21:42:29 +08:00
|
|
|
Case, Exists, Expression, ExpressionList, ExpressionWrapper, F, Func,
|
2019-08-20 15:54:41 +08:00
|
|
|
OrderBy, OuterRef, RowRange, Subquery, Value, ValueRange, When, Window,
|
|
|
|
WindowFrame,
|
2015-03-19 11:07:53 +08:00
|
|
|
)
|
2013-10-18 19:25:30 +08:00
|
|
|
from django.db.models.fields import * # NOQA
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.fields import __all__ as fields_all
|
|
|
|
from django.db.models.fields.files import FileField, ImageField
|
2019-06-09 08:56:37 +08:00
|
|
|
from django.db.models.fields.json import JSONField
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.fields.proxy import OrderWrt
|
2016-06-26 00:32:56 +08:00
|
|
|
from django.db.models.indexes import * # NOQA
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.indexes import __all__ as indexes_all
|
|
|
|
from django.db.models.lookups import Lookup, Transform
|
|
|
|
from django.db.models.manager import Manager
|
2019-08-20 15:54:41 +08:00
|
|
|
from django.db.models.query import Prefetch, QuerySet, prefetch_related_objects
|
|
|
|
from django.db.models.query_utils import FilteredRelation, Q
|
2015-06-16 02:07:31 +08:00
|
|
|
|
|
|
|
# Imports that would create circular imports if sorted
|
2016-10-10 22:13:01 +08:00
|
|
|
from django.db.models.base import DEFERRED, Model # isort:skip
|
|
|
|
from django.db.models.fields.related import ( # isort:skip
|
2015-06-16 02:07:31 +08:00
|
|
|
ForeignKey, ForeignObject, OneToOneField, ManyToManyField,
|
2019-08-20 15:54:41 +08:00
|
|
|
ForeignObjectRel, ManyToOneRel, ManyToManyRel, OneToOneRel,
|
2015-06-16 02:07:31 +08:00
|
|
|
)
|
2006-05-02 09:31:56 +08:00
|
|
|
|
|
|
|
|
2019-01-01 01:57:35 +08:00
|
|
|
__all__ = aggregates_all + constraints_all + enums_all + fields_all + indexes_all
|
2016-10-10 22:13:01 +08:00
|
|
|
__all__ += [
|
|
|
|
'ObjectDoesNotExist', 'signals',
|
2016-10-10 15:23:35 +08:00
|
|
|
'CASCADE', 'DO_NOTHING', 'PROTECT', 'RESTRICT', 'SET', 'SET_DEFAULT',
|
|
|
|
'SET_NULL', 'ProtectedError', 'RestrictedError',
|
2017-09-18 21:42:29 +08:00
|
|
|
'Case', 'Exists', 'Expression', 'ExpressionList', 'ExpressionWrapper', 'F',
|
2019-08-20 15:54:41 +08:00
|
|
|
'Func', 'OrderBy', 'OuterRef', 'RowRange', 'Subquery', 'Value',
|
|
|
|
'ValueRange', 'When',
|
2017-09-18 21:42:29 +08:00
|
|
|
'Window', 'WindowFrame',
|
2019-06-09 08:56:37 +08:00
|
|
|
'FileField', 'ImageField', 'JSONField', 'OrderWrt', 'Lookup', 'Transform',
|
|
|
|
'Manager', 'Prefetch', 'Q', 'QuerySet', 'prefetch_related_objects',
|
|
|
|
'DEFERRED', 'Model', 'FilteredRelation',
|
2016-10-10 22:13:01 +08:00
|
|
|
'ForeignKey', 'ForeignObject', 'OneToOneField', 'ManyToManyField',
|
2019-08-20 15:54:41 +08:00
|
|
|
'ForeignObjectRel', 'ManyToOneRel', 'ManyToManyRel', 'OneToOneRel',
|
2016-10-10 22:13:01 +08:00
|
|
|
]
|