TG 2.2
def foo(self, filename, *args, **kw):
print 'filename=%s' % filename
if tg.request.response_ext:
print 'ext=%s' % tg.request.response_ext
Calling foo('File') results in:
filename=File
ext=None
Calling foo('File.html') results in:
filename=File
ext=.html
Calling foo('File.Some.html') results in:
filename=File
ext=.html
Calling foo('File.Some.More.html') results in:
filename=File.Some
ext=.html
The second to last part of the filename is missing...
[args = None in all cases]
Additionally, the response_ext is None in the case of a filename like
'File.Name.Is.Something'; i.e. it seems to care about valid extensions, but
does still eats up part of the url (filename).
Should use request.environ['PATH_INFO'] to extract the filename instead?
I have looked at
https://groups.google.com/forum/#!searchin/turbogears/URL$20with$20dot/turbogears/2XPMY9ooCgk/OQ19EJvR3CQJ
Thanks!
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/turbogears/-/Vgqk1utOkIMJ.
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.