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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -