django - Fill fields with old value -


i having trouble find way fill form fields manually.

my process:

  1. fill form on frontend
  2. submit wrong data
  3. now want repopulate error field custom value based on old value

currently have overrided __init__ method , add field form self.base_fields['foo']. here able populate field custom way in init method can not access previous submited data (like self.cleaned_data.get('foo'))

i trying data in wrong method , right way this?

*i know fields auto-filled on form errors have special case here


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

Command prompt result in label. Python 2.7 -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -