Arc Forumnew | comments | leaders | submitlogin
7 points by dood 6150 days ago | link | parent

In Python, using the Pylons framework fairly normally

    class HelloController(BaseController):
        def hello_pylons(self):
            if session.get('foo'):
                c.content = 'you said ' + session['foo']                    
            elif request.POST.get('foo'):
                session['foo'] = request.POST['foo']
                session.save()
                c.content = h.link_to('click here')            
            else:
                c.content = h.form('') + h.text_field('foo') + h.submit() + h.end_form()
            return render('template.mako')