[Zope] redirect command and advise in general
Mehmet Yousouf
mehmety@auslin.com.au
Sat, 5 May 2001 10:06:22 +1000
Hi,
I'm slowly putting together an intranet using zope and Mysql to keep track of
orders and manufacturing processes for our business and I've got most things
working however, there are a couple of things (well... lots actually) I am
doing the "wrong way" that I want to fix so that I can cut down on the code
and tidy up a bit (simple things, but when you don't know how...) The first
and easiest......
I'm using zsessions to keep track of things and the same session can be
started from different pages so the way I imagine I should be able to have a
single bit of code to achieve this is either javascript (which I have worked
out how to implement but don't want to use - I frequently have javascript
turned off) or "post" the information to a page that sets the data then
redirects back to the "referring url" which is the way I want to do it.... I
can't work out how to pass the url into the redirect command so I have been
setting up the same page, just slightly changed, for each page that needs to
set a session.... e.g. I'm using:
<dtml-call "RESPONSE.redirect('query_page')">
instead of something like <dtml-call "RESPONSE.redirect('referring url')">
all that's done on the page is setting of the session i.e. <dtml-call
"SESSION.set('blah', blah)">
<dtml-call "RESPONSE.redirect('prodution')">
I could cut down on thirty "pages" by doing it properly
Any help/suggestions/advice would be greatly appreciated