portal_web.views package

Subpackages

Submodules

portal_web.views.base module

class portal_web.views.base.ViewBase(context, request)[source]

Bases: object

The ViewBase class is convenience for form handling

  • process_forms processes registered forms

  • register_forms registers forms ;-)

  • cleanup_forms removes persisted session information

  • redirect sends users elsewhere

cleanup_forms()[source]

Reset form, if not persistent and user left the controller flow

process_forms(data={})[source]
redirect(resource='', *args, **kwargs)[source]
register_form(controller, name=None, persistent=False)[source]

Adds a form (i.e. controller) to a session, remembers it

portal_web.views.debug module

class portal_web.views.debug.DebugViews(context, request)[source]

Bases: ViewBase

benchmark()[source]
check_tryton(request)[source]

This view should display some useful information about Tryton and the database backend.

Is the PostGresDB running? Are there any databases present? Shall we recreate them now?

createdb -h 127.0.0.1 -p 5432 -U postgres -O postgres -w -E UTF-8 c3s env/bin/trytond -d c3s -c etc/trytond.conf –all env/bin/python -m doctest -v etc/scenario_master_data.txt

returns a dictionary of values to render with the template

Module contents