Actually, if the decoding isn't handled well, I'm pretty sure that a test
case would be extremely well-received by the webob maintainers.

On Fri, Jan 15, 2010 at 6:54 AM, Jonathan Schemoul <
[email protected]> wrote:

> Oh just one thing...
>
> request.GET and request.POST are instances of an unicode dict.
> It is cool for most of the cases, but sometimes, the decoding isn't
> well handled in webob...
> In those cases, just use request.str_GET and request.str_POST
> instead... and do the decoding yourself.
>
> Jon
>
> On 15 jan, 04:57, Juparave <[email protected]> wrote:
> > 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]<turbogears%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>
>
>


-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171
         Yahoo/pedermj2002, MSN/[email protected]
--
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