Hi Michael, Thank you for your reply!
> In your first case, the URL being requested is > *actually*http://127.0.0.1:8080/somefile.w/index Aha... so how TG decided if this is a file or some index? Is it because TG *knows* that '.p' could be an extension it treat it that way? What I am trying to implement is kind of filesystem-like navigation, so for this particular controller I want to be able to get its arguments as-is (ie files with full extensions etc). Like this: URL --> controller *args /fs/somedir --> ['somedir'] /fs/somefile.withextention --> ['somefile.withextention'] fs/funnydir.p/nested/myfile.p --> ['funnydir.p', 'nested', 'myfile.p'] To implement this in my previous project that used TG1.* series I just the simple controller method that I posted before. Is it possible to implement such behavior in TG2? Thanks! Erni. On Sep 24, 1:05 am, Michael Pedersen <[email protected]> wrote: > It took me a minute to spot the difference, and I even was starting down the > wrong path. It's fairly simple: > > In your first case, the URL being requested is > *actually*http://127.0.0.1:8080/somefile.w/index > > Your controller is getting a request for the index method for a controller > named somefile.w and is processing it (likely due to using _default). > > In the second case, you are requesting the file somefile.p and TG removes > the extension from the filename, since that's used as part of the way that > TG sends the request to a specific method. > > It's very much expected behavior. It might not be desirable in your case, > though. What's your end goal? Maybe we can help find a solution that meets > that goal. We'll try, anyway. > > On Fri, Sep 23, 2011 at 5:36 PM, Erni Wogernom <[email protected]>wrote: > > > > > > > > > > > Hi all, > > > After upgrading to tg2.1 I stumble on the following problem: using > > URL with dot character in it sometime lead to unexpected results. Here > > is my controller code: > > > @expose() > > def fs(self, *args, **kw): > > print args, kw > > > when I access it withhttp://127.0.0.1:8080/fs/somefile.w- I am > > getting expected output: > > > ('somefile.w',) {} > > > but some url's with '.' in it does not works like that. For example if > > I usinghttp://127.0.0.1:8080/fs/somefile.p- I am getting this > > output (notice the absence of '.p' part): > > > ('somefile',) {} > > > Is this expected behavior? Or am I doing something wrong? > > > Thank you in advance, > > > Erni. > > > -- > > 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. > > -- > Michael J. Pedersen > My IM IDs: Jabber/[email protected], AIM/pedermj022171 > Yahoo/pedermj2002, MSN/[email protected] > My Online Resume:http://www.icelus.org/ > Twitter: pedersentg -- 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.

