betty.url.proxy module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.url.proxy module

Provide proxy URL generators.

final class betty.url.proxy.ProxyLocalizedUrlGenerator

  Bases: `LocalizedUrlGenerator`

  Expose multiple other URL generators as one unified URL generator.

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

    Generate a localized URL for a localizable resource.

    Raises:

      UnsupportedResource –

  supports(resource: Any) → bool

    Whether the given resource is supported by this URL generator.