Robert Wittams wrote:
> Maniac wrote:
> 
>>Robert Wittams wrote:
>>
>>
>>>Why are you flattening the data again? You only do this once, when
>>>extracting the data out of the object instance (or the defaults). The
>>>data is already 'flat' when it comes out of a POST. do_html2python gets
>>>it back into a form suitable for both saving and populating form fields.
>>> 
>>>
>>
>>Uhm... So "flatten_data" is essentially "do_python2html"? If yes, may be
>>just rename it to prevent confusion?
>>
> 
> No. Read the source before suggesting changes to it.
> 

What I mean here is that do_html2python and flatten_data are not
inverses of one another, and so its a bad idea to name them as if they are.

tbh, do_python2html is a horrible name anyway.
At some point we are going to need to renovate the whole lot of

.do_python2html
.get_validation_errors
and the bit of  .save that makes objects,

in order to allow for validations based on objects rather than unprocess
ed POST data, and rational dealing with files.

Something like
object, data, errors = manipulator.process_request(request)

....

Not sure of how exactly this would end up though.

Robert

Reply via email to