PylonsHQ.

crown.hg@gmail.com
Nov 15, 2008 6:29:02 PM

@validate refresh fields

Language: Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#Tickets type:enhancement version:0.9.7
#description:refresh field value from new response
#eg:@validate(schema = FormRegister(), form='index',  post_only=True, on_get=False, refresh_fields=('hexdigest',))
#source:pylons/decorators/__init__.py
#line begin:162


            request.environ['pylons.routes_dict']['action'] = form
            response = self._dispatch_call()
            
            # refresh field value from new response
            if 'refresh_fields' in htmlfill_kwargs:
                for r_f in htmlfill_kwargs['refresh_fields']:
                    if r_f in params:
                        del params[r_f]
                else:
                    del htmlfill_kwargs['refresh_fields']
            
            # XXX: Legacy WSGIResponse support

Download

Comments (0)

You must login before you can comment.

Powered by Pylons - Contact Administrators