Buildbot uses Jinja2 to render its web interface. The authoritative source for
this templating engine is
its own documentation,
of course, but a few notes are in order for those who are
making only minor modifications.

Actions can optionally require authentication, so use needAuthForm to
determine whether to require a 'username' and 'passwd' field in the generated
form. These fields are usually generated by authFormIfNeeded:

{{ authFormIfNeeded(authz, 'myNewTrick') }}

Once the POST request comes in, it's time to check authorization again.
This usually looks something like

The someExtraArg is optional (it's handled with *args, so you can
have several if you want), and is given to the user's authorization function.
For example, a build-related action should pass the build status, so that the
user's authorization function could ensure that devs can only operate on their
own builds.

Note that actionAllowed returns a Deferred instance, so you must wait
for the Deferred and yield the Redirect instead of returning it.