betty.url.proxy module

Provide proxy URL generators.

final class betty.url.proxy.ProxyLocalizedUrlGenerator[source]

Bases: LocalizedUrlGenerator

Expose multiple other URL generators as one unified URL generator.

__init__(*upstreams: LocalizedUrlGenerator)[source]
generate(resource: Any, media_type: str, *, absolute: bool = False, locale: str | Locale | None = None) str[source]

Generate a localized URL for a localizable resource.

Raises:

UnsupportedResource

supports(resource: Any) bool[source]

Whether the given resource is supported by this URL generator.