Humberto Diógenes wrote:
> Hi!
> 
>   I'm trying to port an existing mod_python app to Pylons, but had
> some trouble with Routes. I'd like to keep using URLs the same
> "classic" URL style:
>   http://localhost/location/edit?location_id=123
> 
>   And then have Pylons receive it as arguments for the controller
> method:
> 
> <code>
> class LocationController(BaseController):
>     def edit(self, location_id):
>         return 'Editing %s' % location_id
> </code>
> 
>   But I'm getting this exception:
>   TypeError: edit() takes exactly 2 arguments (1 given)
> 
>   Do you have any directions on what do I need to do to make it work?

Yes, pull location_id from the request GET parameters:

employment_id = request.GET.get('employment_id')

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to