Thanks Kevin, that did it...

from tg import request

good tip, now I know where's that 'id' coming from.

On Jan 11, 10:38 am, Kevin Horn <[email protected]> wrote:
> On Sun, Jan 10, 2010 at 1:12 PM, Juparave <[email protected]> wrote:
> > In a controller I have
>
> >   �...@expose('project.templates.admin.form')
> >    def form(self, **kw):
> >        """
> >        Form to edit
> >        """
> >        tmpl_context.form = new_form
>
> >        account = None
> >        values = dict()
> >        if kw.has_key('id'):  # I want to differentiate between GET id
> > and POST id here
> >            id = kw['id']
> >       ....
>
> > All variables are combined in the kw array, GET and POST, how can I
> > tell where they coming from? Is there a way in TG2 to do this?
>
> > Greetings
> > Juan Pablo
>
> I believe you should be able to tell by checking the WebOb Request Object.
> It's been a while since I've done it, and my memory may be hazy, but try:
>
> from tg import request
>
> or something similar to get it, then look in request.GET or request.POST.
>
> Check out the WebOb documentation for more (and more current) info.
>
> Kevin Horn
-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.


Reply via email to