Hallo, i have one question about calling python script from ZPT my original url is ...:8080/index_html and when i call script my url after this is ....:8080/skript and not ...:8080/index_html any idea? --------------------------------------------------------------------------------- PAGE TEMPLATE --------------------------------------------------------------------------------- <form name="pokus" method="post" action="skript"><input type="submit" name="submit" value="odosli"> <input type="text" name="orders.premenna:records"></form> <span tal:define="global items here/skript" tal:condition="items"> <table><tr><td tal:content="items/prva">pokus</td></tr></table></span> --------------------------------------------------------------------------------- SKRIPT --------------------------------------------------------------------------------- session=context.REQUEST.SESSION items=session.get('items',{}) if order['premenna']=='1': item = {'prva': '0258'} session['items']=item return container.index_html(REQUEST) else: item = {'prva': '2582'} session['items']=item return container.index_html(REQUEST) -- martin ==========================================
Martin Herceg wrote:
Hallo, i have one question about calling python script from ZPT my original url is ...:8080/index_html and when i call script my url after this is ....:8080/skript and not ...:8080/index_html any idea?
Why are you expecting a form submission not to change the URL to that of the form target? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Martin Herceg wrote at 2004-3-3 10:48 +0100:
i have one question about calling python script from ZPT my original url is ...:8080/index_html and when i call script my url after this is ....:8080/skript and not ...:8080/index_html any idea? --------------------------------------------------------------------------------- PAGE TEMPLATE --------------------------------------------------------------------------------- <form name="pokus" method="post" action="skript"><input type="submit"
When you submit this form, the URL changes (as given by the "action" attribute of "form"). You can redirect in your script, when you do not like the URL. -- Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Martin Herceg