mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 05:24:53 +08:00
initial commit
This commit is contained in:
15
django/apps/config.pyi
Normal file
15
django/apps/config.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import (
|
||||
Any,
|
||||
Iterator,
|
||||
)
|
||||
|
||||
|
||||
class AppConfig:
|
||||
def __init__(self, app_name: str, app_module: Any) -> None: ...
|
||||
def _path_from_module(self, module: Any) -> str: ...
|
||||
@classmethod
|
||||
def create(cls, entry: str) -> AppConfig: ...
|
||||
def get_model(self, model_name: str, require_ready: bool = ...) -> Any: ...
|
||||
def get_models(self, include_auto_created: bool = ..., include_swapped: bool = ...) -> Iterator[Any]: ...
|
||||
def import_models(self) -> None: ...
|
||||
def ready(self) -> None: ...
|
||||
23
django/apps/registry.pyi
Normal file
23
django/apps/registry.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
from django.apps.config import AppConfig
|
||||
from django.db.migrations.state import AppConfigStub
|
||||
from typing import (
|
||||
Any,
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class Apps:
|
||||
def __init__(
|
||||
self,
|
||||
installed_apps: Union[Tuple, List[AppConfigStub], List[str]] = ...
|
||||
) -> None: ...
|
||||
def check_apps_ready(self) -> None: ...
|
||||
def check_models_ready(self) -> None: ...
|
||||
def clear_cache(self) -> None: ...
|
||||
def do_pending_operations(self, model: Any) -> None: ...
|
||||
def get_app_config(self, app_label: str) -> AppConfig: ...
|
||||
def get_containing_app_config(self, object_name: str) -> Optional[AppConfig]: ...
|
||||
def get_model(self, app_label: str, model_name: None = ..., require_ready: bool = ...) -> Any: ...
|
||||
Reference in New Issue
Block a user