On Sep 14, 6:21 am, Urs Schroffenegger <[email protected]>
wrote:
>   On 14/09/2010 11:53, Diez B. Roggisch wrote:
>
> > On Tuesday, September 14, 2010 01:07:03 Diego Woitasen wrote:
> >> I have simple method in my root controller:
>
> >> def print(self, text):
> >>      return text
>
> >> I don't know why but when I do
> >>http://localhost:8080/print/www.paypal.comtext variable is equal to
> >> 'www.paypal'. The weird thing is if I do
> >>http://localhost:8080/print/www.paypal.com.arI receive the whole
> >> string.
>
> >> Any idea?
> > Yes, that's a rather weird feature IMHO.
>
> > Use this in your code:
>
> >          if request.response_ext:
> >              resource_id += request.response_ext
>
> > where request is tg.request of course.
>
> > Diez
>
> I saw something similar a couple of weeks ago with the same version. I
> don't remember the details, but isn't it related to the expose decorator
> that's looking for a template? It seems to strip the *.html or *.json to
> know what template to use if you have several.
>
> Maybe this helps...
>
> Cheers,
>
> u


Just FYI, your comment gave me an idea. I tried providing a template
reference via the expose decorator.

@expose( 'my.templates.index' )
def print( self, text ):
  return text

But that still results in the '.com' being snarfed. So no luck. Diego
will have to do some type of quoting or escaping to make it work
properly.


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