Arc Forumnew | comments | leaders | submit | dood's commentslogin

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')

-----