override - Django - Overriding cleaned_data -


i have form fields not on correspondent model. use these "virtual" fields fill real 1 clean() method.

so, user enters data in "virtual" field , have fill real field same data.

i thought overriding cleaned_data["real_field"] possible, cannot it.

my code this:

(...) cleaned_data['real_field'] = cleaned_data['virtual_field'] (...) return cleaned_data 

any ideas on way can it, or if doing wrong, how fix it?

in form class:

def clean(self):     cleaned_data = self.cleaned_data     cleaned_data['real_field'] = cleaned_data['virtual_field']     return cleaned_data 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -