Thanks,

Much appreciated.

Mark

On 12/31/2011 9:35 AM, Muhammet S. AYDIN wrote:
> hi mark,
>
> the environ method's signature is like this in a quickstarted
> project's RootController: "def environ(self)" so it does not receive
> any request parameters. 
>
> if you add arguments like this: "def environ(self, FirstName,
> LastName, submitbutton)" it will work. another option is using keyword
> arguments like "def environ(self, **kwargs)".
>
> good luck.
>
> On Sat, Dec 31, 2011 at 6:20 AM, Mark Bronstein
> <[email protected] <mailto:[email protected]>> wrote:
>
>     this is a newbie question:
>
>     I have created the tg2.1 example app and have created a simple
>     post form
>     that is pointed at the root.environ method in the example app.  All it
>     is supposed to do is to display  request.environ in a template.
>
>     The form I created contains:
>
>     <form action="http://xxx.com/environ"; method="POST" >
>     First Name: <input type="text" name="FirstName" value="" size="15"
>     maxlength="15" />
>     Last Name: <input type="text" name="LastName" value="Smith" size="20"
>     maxlength="20"  />
>     <input type="reset" name="submitbutton" value="cancel" />
>     <input type="submit" name="submitbutton" value="submit" />
>     </form>
>
>     No matter what I name the form parameters, when I submit the form
>     data I
>     get an error message:
>     TypeError: environ() got an unexpected keyword argument 'LastName'
>     (or some other field name)
>
>     It looks like the problem is occurring when pylons tries to
>     validate the
>     parameter names in request.params. But that's as far as I can get.
>      Can
>     someone explain?
>
>     Thanks in advance.
>
>     Mark
>
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "TurboGears" group.
>     To post to this group, send email to [email protected]
>     <mailto:[email protected]>.
>     To unsubscribe from this group, send email to
>     [email protected]
>     <mailto:turbogears%[email protected]>.
>     For more options, visit this group at
>     http://groups.google.com/group/turbogears?hl=en.
>
>
>
>
> -- 
> Muhammet S. AYDIN
> http://compector.com
> http://mengu.net
>
> -- 
> 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.

-- 
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