def dosomething(self, a, b, submit = None):
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
From: illume <ren...@gmail.com>
Date: Tue, 23 Jun 2009 16:31:19 -0700 (PDT)
Local: Tues, Jun 23 2009 7:31 pm
Subject: def dosomething(self, a, b, submit = None):
Hello,
does anyone know how to get rid of the submit=None part?
def dosomething(self, a, b, submit = None):
Since I want forms to pass through a submit field, but for the
cherrypy side to ignore it.
It would be good if I could enable this for a whole application, so no
more 'submit=None' in its methods.
Any ideas on how to get around this?
cheers,
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: fumanchu <fuman...@aminus.org>
Date: Tue, 23 Jun 2009 17:52:39 -0700 (PDT)
Local: Tues, Jun 23 2009 8:52 pm
Subject: Re: def dosomething(self, a, b, submit = None):
illume wrote:
> does anyone know how to get rid of the submit=None part?
> def dosomething(self, a, b, submit = None):
> Since I want forms to pass through a submit field, but for the
> cherrypy side to ignore it.
> It would be good if I could enable this for a whole application, so no
> more 'submit=None' in its methods.
> Any ideas on how to get around this?
def pop_params(params):
for p in params:
cherrypy.request.params.pop(p, None)
cherrypy.tools.pop_params = cherrypy.Tool('before_handler',
pop_params)
[/]
tools.pop_params.on = True
tools.pop_params.params = ['submit']
Robert Brewer
fuman...@aminus.org
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Sylvain Hellegouarch <s...@defuze.org>
Date: Wed, 24 Jun 2009 08:13:28 +0200
Local: Wed, Jun 24 2009 2:13 am
Subject: Re: [cherrypy-users] Re: def dosomething(self, a, b, submit = None):
fumanchu a écrit :
> illume wrote: >> does anyone know how to get rid of the submit=None part? >> def dosomething(self, a, b, submit = None): >> Since I want forms to pass through a submit field, but for the >> cherrypy side to ignore it. >> It would be good if I could enable this for a whole application, so no >> more 'submit=None' in its methods. >> Any ideas on how to get around this? > def pop_params(params): > for p in params: > cherrypy.request.params.pop(p, None) > cherrypy.tools.pop_params = cherrypy.Tool('before_handler', > pop_params) > [/] > tools.pop_params.on = True > tools.pop_params.params = ['submit']
Isn't CherryPy cool? :) - Sylvain
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: illume <ren...@gmail.com>
Date: Wed, 24 Jun 2009 23:54:31 -0700 (PDT)
Local: Thurs, Jun 25 2009 2:54 am
Subject: Re: def dosomething(self, a, b, submit = None):
awesome :) thanks.
On Jun 24, 10:52 am, fumanchu <fuman...@aminus.org> wrote:
> illume wrote:
> > does anyone know how to get rid of the submit=None part?
> > def dosomething(self, a, b, submit = None):
> > Since I want forms to pass through a submit field, but for the
> > cherrypy side to ignore it.
> > It would be good if I could enable this for a whole application, so no
> > more 'submit=None' in its methods.
> > Any ideas on how to get around this?
> def pop_params(params):
> for p in params:
> cherrypy.request.params.pop(p, None)
> cherrypy.tools.pop_params = cherrypy.Tool('before_handler',
> pop_params)
> [/]
> tools.pop_params.on = True
> tools.pop_params.params = ['submit']
> Robert Brewer
> fuman...@aminus.org
You must Sign in before you can post messages.
You do not have the permission required to post.
|
|
|