mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
add missing __init__pyi imports
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
from .config import AppConfig as AppConfig
|
||||||
|
from .registry import apps as apps
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from .array import * # NOQA
|
||||||
|
from .jsonb import * # NOQA
|
||||||
|
from .ranges import * # NOQA
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.core.exceptions import (
|
||||||
|
ObjectDoesNotExist as ObjectDoesNotExist
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models import (
|
||||||
|
signals as signals
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.aggregates import * # NOQA
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.aggregates import __all__ as aggregates_all
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.deletion import (
|
||||||
|
CASCADE as CASCADE,
|
||||||
|
DO_NOTHING as DO_NOTHING,
|
||||||
|
PROTECT as PROTECT,
|
||||||
|
SET as SET,
|
||||||
|
SET_DEFAULT as SET_DEFAULT,
|
||||||
|
SET_NULL as SET_NULL,
|
||||||
|
ProtectedError as ProtectedError,
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.expressions import (
|
||||||
|
Case as Case,
|
||||||
|
Exists as Exists,
|
||||||
|
Expression as Expression,
|
||||||
|
ExpressionList as ExpressionList,
|
||||||
|
ExpressionWrapper as ExpressionWrapper,
|
||||||
|
F as F,
|
||||||
|
Func as Func,
|
||||||
|
OuterRef as OuterRef,
|
||||||
|
RowRange as RowRange,
|
||||||
|
Subquery as Subquery,
|
||||||
|
Value as Value,
|
||||||
|
ValueRange as ValueRange,
|
||||||
|
When as When,
|
||||||
|
Window as Window,
|
||||||
|
WindowFrame as WindowFrame,
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.fields import * # NOQA
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.fields.files import (
|
||||||
|
FileField as FileField,
|
||||||
|
ImageField as ImageField
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.fields.proxy import OrderWrt
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.indexes import * # NOQA
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.lookups import (
|
||||||
|
Lookup as Lookup,
|
||||||
|
Transform as Transform
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.manager import Manager as Manager
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.query import (
|
||||||
|
Prefetch as Prefetch,
|
||||||
|
Q as Q,
|
||||||
|
QuerySet as QuerySet,
|
||||||
|
prefetch_related_objects as prefetch_related_objects,
|
||||||
|
)
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.query_utils import FilteredRelation as FilteredRelation
|
||||||
|
|
||||||
|
# Imports that would create circular imports if sorted
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.base import DEFERRED as DEFERRED, Model as Model # isort:skip
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from django.db.models.fields.related import ( # isort:skip
|
||||||
|
ForeignKey as ForeignKey,
|
||||||
|
ForeignObject as ForeignObject,
|
||||||
|
OneToOneField as OneToOneField,
|
||||||
|
ManyToManyField as ManyToManyField,
|
||||||
|
ManyToOneRel as ManyToOneRel,
|
||||||
|
ManyToManyRel as ManyToManyRel,
|
||||||
|
OneToOneRel as OneToOneRel
|
||||||
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
from django.dispatch.dispatcher import (Signal as Signal, receiver as receiver) # NOQA
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
from django.http.cookie import (
|
||||||
|
SimpleCookie as SimpleCookie,
|
||||||
|
parse_cookie as parse_cookie
|
||||||
|
)
|
||||||
|
from django.http.request import (
|
||||||
|
HttpRequest as HttpRequest,
|
||||||
|
QueryDict as QueryDict,
|
||||||
|
RawPostDataException as RawPostDataException,
|
||||||
|
UnreadablePostError as UnreadablePostError,
|
||||||
|
)
|
||||||
|
from django.http.response import (
|
||||||
|
BadHeaderError as BadHeaderError,
|
||||||
|
FileResponse as FileResponse,
|
||||||
|
Http404 as Http404,
|
||||||
|
HttpResponse as HttpResponse,
|
||||||
|
HttpResponseBadRequest as HttpResponseBadRequest,
|
||||||
|
HttpResponseForbidden as HttpResponseForbidden,
|
||||||
|
HttpResponseGone as HttpResponseGone,
|
||||||
|
HttpResponseNotAllowed as HttpResponseNotAllowed,
|
||||||
|
HttpResponseNotFound as HttpResponseNotFound,
|
||||||
|
HttpResponseNotModified as HttpResponseNotModified,
|
||||||
|
HttpResponsePermanentRedirect as HttpResponsePermanentRedirect,
|
||||||
|
HttpResponseRedirect as HttpResponseRedirect,
|
||||||
|
HttpResponseServerError as HttpResponseServerError,
|
||||||
|
JsonResponse as JsonResponse, StreamingHttpResponse as StreamingHttpResponse
|
||||||
|
)
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from .base import (
|
||||||
|
clear_script_prefix as clear_script_prefix,
|
||||||
|
clear_url_caches as clear_url_caches,
|
||||||
|
get_script_prefix as get_script_prefix,
|
||||||
|
get_urlconf as get_urlconf,
|
||||||
|
is_valid_path as is_valid_path,
|
||||||
|
resolve as resolve,
|
||||||
|
reverse as reverse,
|
||||||
|
reverse_lazy as reverse_lazy,
|
||||||
|
set_script_prefix as set_script_prefix,
|
||||||
|
set_urlconf as set_urlconf,
|
||||||
|
translate_url as translate_url
|
||||||
|
)
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from .conf import (
|
||||||
|
include as include,
|
||||||
|
path as path,
|
||||||
|
re_path as re_path
|
||||||
|
)
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from .converters import (
|
||||||
|
register_converter as register_converter
|
||||||
|
)
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from .exceptions import (
|
||||||
|
NoReverseMatch as NoReverseMatch,
|
||||||
|
Resolver404 as Resolver404
|
||||||
|
)
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from .resolvers import (
|
||||||
|
LocalePrefixPattern as LocalePrefixPattern,
|
||||||
|
ResolverMatch as ResolverMatch,
|
||||||
|
URLPattern as URLPattern,
|
||||||
|
URLResolver as URLResolver,
|
||||||
|
get_ns_resolver as get_ns_resolver,
|
||||||
|
get_resolver as get_resolver
|
||||||
|
)
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
|
from .utils import (
|
||||||
|
get_callable as get_callable,
|
||||||
|
get_mod_func as get_mod_func
|
||||||
|
)
|
||||||
|
|||||||
9
django-stubs/urls/exceptions.pyi
Normal file
9
django-stubs/urls/exceptions.pyi
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from django.http import Http404
|
||||||
|
|
||||||
|
|
||||||
|
class Resolver404(Http404):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class NoReverseMatch(Exception):
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user