def step5():
    response.view = 'wizard/step.html'
    n = int(request.args(-1) or 0)
    m = len(session.app['pages'])
    if n >= m:
        redirect(URL('step4'))
    page = session.app['pages'][n]
    markmin_url = 'http://web2py.com/examples/static/markmin.html'
    form = SQLFORM.factory(Field('content', 'text',
                                 default=session.app.get('page_' + page, []),
                                 comment=A('use markmin',
                                           _href=markmin_url, _target='_blank')),
                           formstyle='table2cols', _class="span7 well well-small")
    if form.accepts(request.vars):
        session.app['page_' + page] = form.vars.content
        if n < m - 1:
            redirect(URL('step5', args=n + 1) + '/#xwizard_form')
        else:
            redirect(URL('step6') + '/#xwizard_form')
    return dict(step='5: View for page "%s" (%s of %s)' % (page, n + 1, m), form=form)
dataset/ETHPy150Open uwdata/termite-data-server/web2py/applications-original/admin/controllers/wizard.py/step5/original