File: loader.pyi

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (17 lines) | stat: -rw-r--r-- 675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from collections.abc import Mapping, Sequence
from typing import Any

from django.http.request import HttpRequest
from django.template.exceptions import TemplateDoesNotExist as TemplateDoesNotExist
from django.utils.safestring import SafeString

from .backends.base import _EngineTemplate

def get_template(template_name: str, using: str | None = None) -> _EngineTemplate: ...
def select_template(template_name_list: Sequence[str] | str, using: str | None = None) -> Any: ...
def render_to_string(
    template_name: Sequence[str] | str,
    context: Mapping[str, Any] | None = None,
    request: HttpRequest | None = None,
    using: str | None = None,
) -> SafeString: ...