mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-18 09:56:00 +08:00
initial commit
This commit is contained in:
8
django/template/loaders/app_directories.pyi
Normal file
8
django/template/loaders/app_directories.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
from typing import (
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class Loader:
|
||||
def get_dirs(self) -> Union[Tuple[str, str, str, str], Tuple[str, str, str], Tuple[str], Tuple[str, str]]: ...
|
||||
18
django/template/loaders/base.pyi
Normal file
18
django/template/loaders/base.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from django.template.base import (
|
||||
Origin,
|
||||
Template,
|
||||
)
|
||||
from django.template.engine import Engine
|
||||
from typing import (
|
||||
List,
|
||||
Optional,
|
||||
)
|
||||
|
||||
|
||||
class Loader:
|
||||
def __init__(self, engine: Engine) -> None: ...
|
||||
def get_template(
|
||||
self,
|
||||
template_name: str,
|
||||
skip: Optional[List[Origin]] = ...
|
||||
) -> Template: ...
|
||||
29
django/template/loaders/cached.pyi
Normal file
29
django/template/loaders/cached.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from django.template.base import (
|
||||
Origin,
|
||||
Template,
|
||||
)
|
||||
from django.template.engine import Engine
|
||||
from typing import (
|
||||
Dict,
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class Loader:
|
||||
def __init__(
|
||||
self,
|
||||
engine: Engine,
|
||||
loaders: Union[List[Tuple[str, Dict[str, str]]], List[str]]
|
||||
) -> None: ...
|
||||
def cache_key(self, template_name: str, skip: Optional[List[Origin]] = ...) -> str: ...
|
||||
def generate_hash(self, values: List[str]) -> str: ...
|
||||
def get_contents(self, origin: Origin) -> str: ...
|
||||
def get_template(
|
||||
self,
|
||||
template_name: str,
|
||||
skip: Optional[List[Origin]] = ...
|
||||
) -> Template: ...
|
||||
def get_template_sources(self, template_name: str) -> None: ...
|
||||
14
django/template/loaders/filesystem.pyi
Normal file
14
django/template/loaders/filesystem.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.template.base import Origin
|
||||
from django.template.engine import Engine
|
||||
from typing import (
|
||||
Iterator,
|
||||
List,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
class Loader:
|
||||
def __init__(self, engine: Engine, dirs: None = ...) -> None: ...
|
||||
def get_contents(self, origin: Origin): ...
|
||||
def get_dirs(self) -> List[str]: ...
|
||||
def get_template_sources(self, template_name: Union[str, bytes]) -> Iterator[Origin]: ...
|
||||
12
django/template/loaders/locmem.pyi
Normal file
12
django/template/loaders/locmem.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.template.base import Origin
|
||||
from django.template.engine import Engine
|
||||
from typing import (
|
||||
Dict,
|
||||
Iterator,
|
||||
)
|
||||
|
||||
|
||||
class Loader:
|
||||
def __init__(self, engine: Engine, templates_dict: Dict[str, str]) -> None: ...
|
||||
def get_contents(self, origin: Origin) -> str: ...
|
||||
def get_template_sources(self, template_name: str) -> Iterator[Origin]: ...
|
||||
Reference in New Issue
Block a user