Marshalling of records in REQUEST.form
Hi all I've just noticed this. In my form I have, for example: <input name='HostType:list' value='Sequential'> <input name='properties_to_show.ContactPerson:list' value='ContactName'> <input name='properties_to_show.ContactPerson:list' value='DirectEmail'> <input name='properties_to_show.Customer:list' value='CustomerName'> <input name='properties_to_show.Customer:list' value='CustomerStatus'> When I log this after submission, I see: {'HostType': ['Sequential'], 'properties_to_show': ContactPerson: ['ContactName', 'DirectEmail'], Customer: ['CustomerName', 'CustomerStatus']} In other words, not a valid dictionary. As a valid dictionary, that would be: {'HostType': ['Sequential'], 'properties_to_show': {'ContactPerson': ['ContactName', 'DirectEmail'], 'Customer': ['CustomerName', 'CustomerStatus']}} Is a bug or a feature? Is the reason for the representation the fact that 'properties_to_show' is a record, and not a dictionary? -- Jean Jordaan Upfront Systems http://www.upfrontsystems.co.za
Jean Jordaan writes:
I've just noticed this. In my form I have, for example:
<input name='HostType:list' value='Sequential'> <input name='properties_to_show.ContactPerson:list' value='ContactName'> <input name='properties_to_show.ContactPerson:list' value='DirectEmail'> <input name='properties_to_show.Customer:list' value='CustomerName'> <input name='properties_to_show.Customer:list' value='CustomerStatus'>
When I log this after submission, I see:
{'HostType': ['Sequential'], 'properties_to_show': ContactPerson: ['ContactName', 'DirectEmail'], Customer: ['CustomerName', 'CustomerStatus']} Where are you looking at?
When I look at "REQUEST.form", I see: { 'P.N' : ['N1', 'N2'], 'P.C' : ['C1', 'C2'] } (with shortened names). I.e. I see what I expect to see. My Zope is 2.5.0 (CVS version from end of Jan 2002). Dieter
Hi Dieter Roughly, I do this: FSSession.set('query_form', REQUEST.form) ... context.log('query_form: %s'%FSSession(query_form)) where the 'log' external method is: import zLOG def log(message,summary='',severity=0): zLOG.LOG('MyDebugLog',severity,summary,message) The output I quoted in the previous message appears in the logfile. My Zope is 2.4.3 -- Jean Jordaan Upfront Systems http://www.upfrontsystems.co.za
participants (2)
-
Dieter Maurer -
Jean Jordaan