django - password field data gets clear after submitting -


i uisng django's auth_user table username , password.to change password field did below in forms.py

class userregisterform(forms.modelform):     password = forms.charfield(widget=forms.passwordinput())     class meta:         model = user 

after changing password field widget passwordinput,whatever password enter gets cleared if press save button.i tested it,the data gets saved in db,i able login using same username , password.

template.py

<tr>     <td>password</td><td>{{registerform.password}}*                                 </tr> 

clarification:before changing password widget,the value entered displayed in field same , not cleared in field if save.

after changing password widget getting issue.password showing in bullet point symbol if hit save button,entered password gets cleared field(field become empty saving in model)

what problem this.

thanks

this correct behaviour, of course. not want password returned user: security risk. displaying blank edit box right thing do.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -