ó Mı1Sc@spddlmZddlmZddlmZddlTdejfd„ƒYZ dejfd„ƒYZ d S( i˙˙˙˙(tforms(tReadOnlyPasswordHashField(t ugettext_lazy(t*tFuncionarioCreationFormcBs­eZdZiedƒd6edƒd6ZejdedƒdejƒZejdedƒdejd ed ƒƒZ d dd „ƒYZ d „Z d„Z e d„ZRS(s_ A form for creating new users. Includes all the required fields, plus a repeated password. s&A user with that email already exists.tduplicate_usernames%The two password fields didn't match.tpassword_mismatchtlabeltPasswordtwidgetsPassword confirmationt help_texts3Enter the same password as above, for verification.tMetacBseZeZdZRS(tusernamet matriculatemail(susernames matriculasemail(t__name__t __module__t Funcionariotmodeltfields(((s./ponto/forms.pyR scCsV|jd}ytjjd|ƒWntjk r;|SXtj|jdƒ‚dS(NRtduplicate_email(t cleaned_dataRt_default_managertgett DoesNotExistRtValidationErrorterror_messages(tselfR((s./ponto/forms.pyt clean_emails  cCsY|jjdƒ}|jjdƒ}|rU|rU||krUtj|jdƒ‚n|S(Nt password1t password2R(RRRRR(RRR((s./ponto/forms.pytclean_password2%s cCsFtt|ƒjdtƒ}|j|jdƒ|rB|jƒn|S(NtcommitR(tsuperRtsavetFalset set_passwordR(RR tuser((s./ponto/forms.pyR"-s  ((RRt__doc__t_RRt CharFieldt PasswordInputRRR RRtTrueR"(((s./ponto/forms.pyR s !- tFuncionarioChangeFormcBsTeZdZededƒdedƒƒZdd d„ƒYZd„Zd„ZRS( sŽ A form for updating users. Includes all the fields on the user, but replaces the password field with admin's password hash display field. RRR s–Raw passwords are not stored, so there is no way to see this user's password, but you can change the password using this form.R cBseZeZRS((RRRR(((s./ponto/forms.pyR >scOsVtt|ƒj||Ž|jjddƒ}|dk rR|jjdƒ|_ndS(Ntuser_permissionst content_type(R!R+t__init__RRtNonetquerysettselect_related(Rtargstkwargstf((s./ponto/forms.pyR.As cCs |jdS(Ntpassword(tinitial(R((s./ponto/forms.pytclean_passwordGs(( RRR&RR'R5R R.R7(((s./ponto/forms.pyR+6s ! N( tdjangoRtdjango.contrib.auth.formsRtdjango.utils.translationRR'tmodelst ModelFormRR+(((s./ponto/forms.pyts  -