Module Contents



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 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 server.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(self, authMethods, tpl=None, **kwargs)
login(self, skel, tpl=None, **kwargs)
loginChoices(self, authMethods, tpl=None, **kwargs)
loginSucceeded(self, tpl=None, **kwargs)
logoutSuccess(self, tpl=None, **kwargs)
verifySuccess(self, skel, tpl=None, **kwargs)
verifyFailed(self, tpl=None, **kwargs)
passwdRecoverInfo(self, msg, skel=None, tpl=None, **kwargs)
passwdRecover(self, *args, **kwargs)