[ZCM] [ZC] 1308/ 2 Edit "Need "actual URL" method"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed May 12 08:55:17 EDT 2004


Issue #1308 Update (Edit) "Need "actual URL" method"
 Status Pending, Zope/feature+solution medium
To followup, visit:
  http://zope.org/Collectors/Zope/1308

==============================================================
= Edit - Entry #2 by ajung on May 12, 2004 8:55 am

 Changes: submitter email, importance (critical => medium)
________________________________________
= Request - Entry #1 by dchandek on May 3, 2004 5:07 pm

This is related to issue 1252.

Need a way to print the _actual_ URL of a "page".

For example, "The URL of this page is <span tal:replace="request/actual_url">URL</span>.

Here's a possible solution candidate:

request = container.REQUEST
qs = request.QUERY_STRING
if request.has_key('VIRTUAL_URL'):
  base_url = request.VIRTUAL_URL
else:
  base_url = request.URL
url =  base_url + ( qs and ( '?%s' % qs ) )
return url

something like that ...

Thanks,
David
==============================================================




More information about the Zope-Collector-Monitor mailing list