mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 16:27:09 +08:00
Improved return type of render_to_string(). (#1036)
This commit is contained in:
@@ -2,6 +2,7 @@ from typing import Any, Mapping, Optional, Sequence, Union
|
|||||||
|
|
||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.template.exceptions import TemplateDoesNotExist as TemplateDoesNotExist # noqa: F401
|
from django.template.exceptions import TemplateDoesNotExist as TemplateDoesNotExist # noqa: F401
|
||||||
|
from django.utils.safestring import SafeString
|
||||||
|
|
||||||
from . import engines as engines # noqa: F401
|
from . import engines as engines # noqa: F401
|
||||||
from .backends.base import _EngineTemplate
|
from .backends.base import _EngineTemplate
|
||||||
@@ -13,4 +14,4 @@ def render_to_string(
|
|||||||
context: Optional[Mapping[str, Any]] = ...,
|
context: Optional[Mapping[str, Any]] = ...,
|
||||||
request: Optional[HttpRequest] = ...,
|
request: Optional[HttpRequest] = ...,
|
||||||
using: Optional[str] = ...,
|
using: Optional[str] = ...,
|
||||||
) -> str: ...
|
) -> SafeString: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user