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:
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_menu_handler(**kwargs)[source]

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.

make_form(request, **kwargs)[source]

Make and return a new Form instance, per the given kwargs.

This is the “base” factory which merely invokes the constructor.

make_grid(request, **kwargs)[source]

Make and return a new Grid instance, per the given kwargs.

This is the “base” factory which merely invokes the constructor.