mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-23 20:31:32 +08:00
add tests for the django test suite
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from typing import Any, Dict, Iterator, Optional, List
|
||||
|
||||
from django.template.base import Template
|
||||
from django.template.base import Template as Template
|
||||
from django.template.exceptions import TemplateDoesNotExist
|
||||
|
||||
from django.template.engine import Engine
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Callable, Dict, List, Optional, Tuple, Any
|
||||
|
||||
from django.template.base import Template
|
||||
from django.template.base import Template as Template
|
||||
from django.template.exceptions import TemplateSyntaxError
|
||||
|
||||
from .base import BaseEngine
|
||||
|
||||
@@ -51,5 +51,5 @@ class Engine:
|
||||
) -> Tuple[Template, Origin]: ...
|
||||
def from_string(self, template_code: str) -> Template: ...
|
||||
def get_template(self, template_name: str) -> Template: ...
|
||||
def render_to_string(self, template_name: str, context: Any = ...) -> SafeText: ...
|
||||
def render_to_string(self, template_name: str, context: Optional[Dict[str, Any]] = ...) -> SafeText: ...
|
||||
def select_template(self, template_name_list: List[str]) -> Template: ...
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
from typing import Dict, List, Optional, Union
|
||||
from typing import Dict, List, Optional, Union, Any
|
||||
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.template.backends.django import Template as DjangoTemplate
|
||||
from django.template.backends.dummy import Template as DummyTemplate
|
||||
from django.template.backends.jinja2 import Template as Jinja2Template
|
||||
|
||||
def get_template(
|
||||
template_name: str, using: Optional[str] = ...
|
||||
) -> Union[DjangoTemplate, DummyTemplate, Jinja2Template]: ...
|
||||
def select_template(
|
||||
template_name_list: Union[List[str], str], using: Optional[str] = ...
|
||||
) -> Union[DjangoTemplate, DummyTemplate, Jinja2Template]: ...
|
||||
def get_template(template_name: str, using: Optional[str] = ...) -> Any: ...
|
||||
def select_template(template_name_list: Union[List[str], str], using: Optional[str] = ...) -> Any: ...
|
||||
def render_to_string(
|
||||
template_name: Union[List[str], str],
|
||||
context: Optional[Union[Dict[str, bool], Dict[str, str]]] = ...,
|
||||
context: Optional[Dict[str, Any]] = ...,
|
||||
request: Optional[WSGIRequest] = ...,
|
||||
using: Optional[str] = ...,
|
||||
) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user