Re: [Zope] assign REQUEST object to redirect?

2006-09-09 Thread Maciej Wisniowski



container.REQUEST.form['id'] = 1
return context.index_html(container.REQUEST)


then I have access to request/form/id within the page
template index_html.

Now I must redirect instead of returning like

return
container.REQUEST.RESPONSE.redirect('index_html')
 


And what about session:

in first script:

container.REQUEST.SESSION.set('myid', 1)

and in the second script:

container.REQUEST.SESSION.get('myid', -1)

You may want to remove myid from session 
in the second script.


--
Maciej Wisniowski


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] assign REQUEST object to redirect?

2006-09-09 Thread Andreas Jung



--On 9. September 2006 03:20:55 -0700 Ferhat Ayaz <[EMAIL PROTECTED]> 
wrote:



Thanks for your replay.
I know the redirect (301) mechanism. I'm searching for
an easy way "to get the information as form post" to
the redirected url. Without appending it as a query
string.


A redirection can never be a POST request. If you need to pass parameter 
then do this only through the URL. If you don't want that, store your data

in the SESSION.



How can I say in an easy way "redirect to this url an
use this form (container.REQUEST.form) as posting to
the the url?


Why is POST a requirement. Zope basically does not make a difference
between GET and POST.


-aj

pgp06AfWl9zhi.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] assign REQUEST object to redirect?

2006-09-09 Thread Ferhat Ayaz
Thanks for your replay.
I know the redirect (301) mechanism. I'm searching for
an easy way "to get the information as form post" to
the redirected url. Without appending it as a query
string.

How can I say in an easy way "redirect to this url an
use this form (container.REQUEST.form) as posting to
the the url?

Thanks,
Ferhat


--- Andrew Milton <[EMAIL PROTECTED]> wrote:

> +---[ Ferhat Ayaz ]--
> | Hi,
> | 
> | If I return n Script (Python) the following
> | 
> | container.REQUEST.form['id'] = 1
> | return context.index_html(container.REQUEST)
> | 
> | 
> | then I have access to request/form/id within the
> page
> | template index_html.
> | 
> | Now I must redirect instead of returning like
> | 
> | return
> | container.REQUEST.RESPONSE.redirect('index_html')
> | 
> | But how can I give request object in a redirect.
> | Don't suggest the way appending the query string
> with 
> | 
> | 'index_html?'+form fields ...
> 
> I don't think you understand what a redirect is.
> 
> If you redirect, it instructs the client's browser
> to open a new connection as
> if the user typed the URL into the location bar.
> 
> You can only transfer in a few ways;
> 
> o Query String
> o Posting 
> o Setting information in a cookie
>   - Either all the information,
>   - or a key to look it up from some other storage.
> 
> -- 
> Andrew Milton
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] assign REQUEST object to redirect?

2006-09-09 Thread Andrew Milton
+---[ Ferhat Ayaz ]--
| Hi,
| 
| If I return n Script (Python) the following
| 
| container.REQUEST.form['id'] = 1
| return context.index_html(container.REQUEST)
| 
| 
| then I have access to request/form/id within the page
| template index_html.
| 
| Now I must redirect instead of returning like
| 
| return
| container.REQUEST.RESPONSE.redirect('index_html')
| 
| But how can I give request object in a redirect.
| Don't suggest the way appending the query string with 
| 
| 'index_html?'+form fields ...

I don't think you understand what a redirect is.

If you redirect, it instructs the client's browser to open a new connection as
if the user typed the URL into the location bar.

You can only transfer in a few ways;

o Query String
o Posting 
o Setting information in a cookie
  - Either all the information,
  - or a key to look it up from some other storage.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] assign REQUEST object to redirect?

2006-09-09 Thread Ferhat Ayaz
Hi,

If I return n Script (Python) the following

container.REQUEST.form['id'] = 1
return context.index_html(container.REQUEST)


then I have access to request/form/id within the page
template index_html.

Now I must redirect instead of returning like

return
container.REQUEST.RESPONSE.redirect('index_html')

But how can I give request object in a redirect.
Don't suggest the way appending the query string with 

'index_html?'+form fields ...

Thanks,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )