betty.url package¶
Submodules¶
Module contents¶
Provide a URL generation API.
- class betty.url.LocalizedUrlGenerator[source]¶
Bases:
_UrlGenerator
Generate URLs for localizable resources.
- class betty.url.StaticUrlGenerator[source]¶
Bases:
_UrlGenerator
Generate URLs for static (non-localizable) resources.
- exception betty.url.UnsupportedResource[source]¶
Bases:
RuntimeError
Raised when a URL generator cannot generate a URL for a resource.
These are preventable by checking
betty.url.LocalizedUrlGenerator.supports()
orbetty.url.StaticUrlGenerator.supports()
first.