typelets.django.strings

Typing useful for working with Django strings.

Added in version 1.0.

Module Attributes

StrOrPromise

A type indicating a Unicode string or lazily-localized string.

StrPromise

A type indicating a lazily-localized string.

typelets.django.strings.StrOrPromise

A type indicating a Unicode string or lazily-localized string.

Added in version 1.0.

Example

s1: StrOrPromise = gettext_lazy('...')
s2: StrOrPromise = gettext('...')
s3: StrOrPromise = '...'

alias of str | StrPromise

class typelets.django.strings.StrPromise

A type indicating a lazily-localized string.

Added in version 1.0.

Example

s: StrOrPromise = gettext_lazy('...')

alias of Promise

__name__ = 'StrPromise'
__qualname__ = 'StrPromise'
__supertype__

alias of Promise