wuttaweb.handler
¶
Web Handler
- class wuttaweb.handler.WebHandler(config)[source]¶
Base class and default implementation for the web handler.
This is responsible for determining the menu handler and various other customizations.
- get_fanstatic_url(request, resource)[source]¶
Returns the full URL to the given Fanstatic resource.
- Parameters:
request – Current request object.
resource –
fanstatic.Resource
instance representing an image file or other resource.
- get_favicon_url(request)[source]¶
Returns the canonical app favicon image URL.
This will return the fallback favicon from WuttaWeb unless config specifies an override:
[wuttaweb] favicon_url = http://example.com/favicon.ico
- get_header_logo_url(request)[source]¶
Returns the canonical app header image URL.
This will return the value from config if specified (as shown below); otherwise it will just call
get_favicon_url()
and return that.[wuttaweb] header_logo_url = http://example.com/logo.png
- get_main_logo_url(request)[source]¶
Returns the canonical app logo image URL.
This will return the fallback logo from WuttaWeb unless config specifies an override:
[wuttaweb] logo_url = http://example.com/logo.png
Get the configured “menu” handler for the web app.
Specify a custom handler in your config file like this:
[wutta.web] menus.handler_spec = poser.web.menus:PoserMenuHandler
- Returns:
Instance of
MenuHandler
.