def uidb36_to_uidb64(uidb36):
 try:
  uidb64 = force_text(urlsafe_base64_encode(force_bytes(base36_to_int(uidb36))))
 except ValueError:
  uidb64 = '1'
 return uidb64

def uidb36_to_uidb64 ( uidb36 ) : try : uidb64 = force_text ( urlsafe_base64_encode ( force_bytes ( base36_to_int ( uidb36 ) ) ) ) except ValueError : uidb64 = '1' return uidb64
needed to support old password reset urls that use base36-encoded user ids URL#diff-c571286052438b2e3190f8db8331a92br231 args: uidb36: base36-encoded user id returns: base64-encoded user id .