parameters: (request, user, template="email/new_user.txt", context={})
docstring: Send email to newly created accounts
docstring_summary: Send email to newly created accounts
docstring_tokens: Send email to newly created accounts
function: def email_new_user(request, user, template="email/new_user.txt", context={}):
      """
      Send email to newly created accounts
      """
      # This uses the forgot-password flow; logic is borrowed from auth_forms.PasswordResetForm.save()
      activation_route = request.build_absolute_uri(reverse('password_reset_confirm', args=[
          urlsafe_base64_encode(force_bytes(user.pk)),
          default_token_generator.make_token(user),
      ]))
      context.update({
          'activation_route': activation_route,
          'activation_expires': settings.PASSWORD_RESET_TIMEOUT_DAYS,
          'request': request
      })
      send_user_email(
          user.email,
          template,
          context
      )
function_tokens: def email_new_user ( request , user , template = "email/new_user.txt" , context = { } ) : # This uses the forgot-password flow; logic is borrowed from auth_forms.PasswordResetForm.save() activation_route = request . build_absolute_uri ( reverse ( 'password_reset_confirm' , args = [ urlsafe_base64_encode ( force_bytes ( user . pk ) ) , default_token_generator . make_token ( user ) , ] ) ) context . update ( { 'activation_route' : activation_route , 'activation_expires' : settings . PASSWORD_RESET_TIMEOUT_DAYS , 'request' : request } ) send_user_email ( user . email , template , context )