On Feb 2, 2011, at 4:00 PM, Jonathan Lundell wrote: > > On Feb 2, 2011, at 3:44 PM, walter wrote: >> >> When I do next in the action: >> def check(): >> if request.args(1) == None: >> table = request.args(0) >> >> return dict(table=table) >> >> And my url has a trailing slash after a function argument (i.e. >> applictation/controller/function/argument/) I catch an internal error >> everytime. >> I confused. What do I do wrong? > > What internal error do you get? In the current release, a URL like this: > >> application/controller/function/argument/ > > Gives you args like this: ['argument', ''] > > ...that is, the trailing slash is interpreted to mean that there's a second > (empty) arg. The version in the trunk strips (all) trailing slashes, so this > doesn't happen.
You could try: def check(): if not request.args(1): table = request.args(0)