Google Groups Home
Help | Sign in
Questions about cherrypy.request.object_path
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
pytrade  
View profile
 More options Jul 7 2006, 4:21 pm
From: "pytrade" <vinjv...@gmail.com>
Date: Fri, 07 Jul 2006 20:21:49 -0000
Local: Fri, Jul 7 2006 4:21 pm
Subject: Questions about cherrypy.request.object_path
I'm using cherrypy.request.object_path to get the current url
(including after an internal redirect). The problem is that it just
shows the url and not the variables

For instance:

If the current url after an internal redirect is:

http://domain/servlet/action.py?customerId=100

cherrypy.request.object_path just shows:
http://domain/servlet/action.py

How can I get the entire url after an internal redirect:
http://domain/servlet/action.py?customerId=100

Thanks,

Vineet


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Wyglendowski  
View profile
 More options Jul 7 2006, 4:28 pm
From: "Christian Wyglendowski" <christ...@dowski.com>
Date: Fri, 7 Jul 2006 16:28:14 -0400
Local: Fri, Jul 7 2006 4:28 pm
Subject: Re: [cherrypy-users] Questions about cherrypy.request.object_path

On 7/7/06, pytrade <vinjv...@gmail.com> wrote:
[snip]

How can I get the entire url after an internal redirect:

Well, you can grab the value from cherrypy.request.query_string.  That
should give you everything after the ? (question mark).  However, the
internal redirect doesn't change the actual URL that is visited - it's
internal.

Christian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Brewer  
View profile
 More options Jul 7 2006, 5:05 pm
From: "Robert Brewer" <fuman...@amor.org>
Date: Fri, 7 Jul 2006 14:05:38 -0700
Local: Fri, Jul 7 2006 5:05 pm
Subject: RE: [cherrypy-users] Questions about cherrypy.request.object_path

request.browser_url should do the trick for "before the redirect". But I
can't figure how "URL after an InternalRedirect" has any meaning, since
you're not telling the client anyway. If you want to notify the client
of a redirected URL, use HTTPRedirect; that's exactly what it's for.

Robert Brewer
System Architect
Amor Ministries
fuman...@amor.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pytrade  
View profile
 More options Jul 7 2006, 10:47 pm
From: "pytrade" <vinjv...@gmail.com>
Date: Sat, 08 Jul 2006 02:47:10 -0000
Local: Fri, Jul 7 2006 10:47 pm
Subject: Re: Questions about cherrypy.request.object_path
>> But I

can't figure how "URL after an InternalRedirect" has any meaning

I'll try and give you an example. On each page I have a resize option
which will adjust the page size based on your browser. Similar to what
yahoo has. This javascript function sets the appropriate value in the
user session and redisplays the current page. The url for the current
page is retrieved now by doing (thanks to Christian's suggestion)

cherrypy.request.object_path+"?"+cherrypy.request.query_string


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google