[Zope] Re: question on python script, dtml method and options

2005-07-20 Thread Josef Meile

Hi Erik,

next_state does get initialized - it is the name of the submit buttons 
on my various forms.

So, then it should be in the request object. Just to test it, put the
following at the begining of your python script (You don't have to
delelete anything):

return request

Then submit the form that calls the script and check if next_state is
really a key in the request object. On the contrary, it could be an
error in the html code where create the form.

Regards,
Josef

___
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] Re: question on python script, dtml method and options

2005-07-19 Thread Josef Meile

Hi Erik,

I don't get a traceback, i just get error and message back as empty 
strings; their initiallized value.


very strange.

Looking at your python script I saw that initially you set error and
message to the empty string ''. I guess the script is not detecting a
'next_state' keyword in the request. So, it is excecuting the first if
of your code:

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

Where are you initializing 'next_state'? Try printing the request
object to see if it really exists or perhaps you are doing some typo.

Regards,
Josef

___
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] Re: question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki
next_state does get initialized - it is the name of the submit buttons on my 
various forms.



Josef Meile wrote:

Hi Erik,

I don't get a traceback, i just get error and message back as empty 
strings; their initiallized value.


very strange.


Looking at your python script I saw that initially you set error and
message to the empty string ''. I guess the script is not detecting a
'next_state' keyword in the request. So, it is excecuting the first if
of your code:

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

Where are you initializing 'next_state'? Try printing the request
object to see if it really exists or perhaps you are doing some typo.

Regards,
Josef

___
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 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 )