Hello.

I use the following pattern in my applications:

controller.py

def signin(self):
    
    if request.method == 'POST':
       try:
           (...)           
       except formencode.Invalid, error:
           (...)
       else:
           (...)
    else:
        return formencode.htmlfill.render (                
               html,
               defaults = (...),
               errors = (...),
               encoding = 'utf-8')

Because authenticate_form validator always checks for token key (even if 
request method is GET), my pattern fails because I can't even render a 
page without a token :->. I've changed the decorator to execute only when 
there's something in request.POST (or perhaps I should check for 
request.method?) -> http://pastebin.com/f1411a3bd

Is this correct and do you think it's reasonable to merge this patch into 
trunk?

Regards,
Marcin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to