On 1/25/06, Mike Sarahan <[EMAIL PROTECTED]> wrote:
>
> Lee,
>
> Thanks for your help.

No problem :)

> So it's getting the parameters for both the referring page (album gets
> pathadd) and the edit page (gets alt_ID).
>
[...]
>
> Why would it be picking up parameters from the edit method?
>

The answer is, it shouldn't be.

I think there may be something not quite right with the way you're
removing the large section of your url...  somehow the ?pathadd=2002
is already in the url when appending the new parameter list (I think).

Try this for size:

       @turbogears.expose()
      def logout( self ):
              identity.current.logout()
              previous_url =
cherrypy.request.headerMap.get("Referer", "/")
              original_parameters=cherrypy.request.paramMap
              #Changes start here
              itemlist = ["%s=%s" % (name,value) for name,value in
original_parameters.items() if name and value]
              previous_url=previous_url.split("?")[0]  # Split the
previous_url and discard any unwanted parameters
              previous_url=(%s?%s) % (previous_url[52:],"&".join(itemlist))
              raise turbogears.redirect(previous_url)

I'm not sure if this will solve the problem for you or not.  I can't
see how two ?'s are getting in there with this code otherwise.

Reply via email to