core.render.html.user

Module Contents

Classes

Render

The core jinja2 render.

class core.render.html.user.Render(parent=None, *args, **kwargs)

Bases: core.render.html.default

The core jinja2 render.

This is the bridge between your ViUR modules and your templates. First, the default jinja2-api is exposed to your templates. See http://jinja.pocoo.org/ for more information. Second, we’ll pass data das global variables to templates depending on the current action.

  • For list() we’ll pass skellist - a viur.core.render.jinja2.default.SkelListWrapper instance

  • For view(): skel - a dictionary with values from the skeleton prepared for use inside html

  • For add()/edit: a dictionary as skel with values, structure and errors as keys.

Third, a bunch of global filters (like urlencode) and functions (getEntry, ..) are available to templates.

See the ViUR Documentation for more information about functions and data available to jinja2 templates.

Its possible for modules to extend the list of filters/functions available to templates by defining a function called jinjaEnv. Its called from the render when the environment is first created and can extend/override the functionality exposed to templates.

loginTemplate = user_login
loginChoicesTemplate = user_login_choices
logoutSuccessTemplate = user_logout_success
loginSuccessTemplate = user_login_success
verifySuccessTemplate = user_verify_success
verifyFailedTemplate = user_verify_failed
passwdRecoverInfoTemplate = user_passwdrecover_info
login_disabled(authMethods, tpl=None, **kwargs)
login(skel, tpl=None, **kwargs)
loginChoices(authMethods, tpl=None, **kwargs)
loginSucceeded(tpl=None, **kwargs)
logoutSuccess(tpl=None, **kwargs)
verifySuccess(skel, tpl=None, **kwargs)
verifyFailed(tpl=None, **kwargs)
passwdRecoverInfo(msg, skel=None, tpl=None, **kwargs)
passwdRecover(*args, **kwargs)