


'''simple docstring'''

import requests

try:
     from django.contrib.auth import authenticate, login
     from django.shortcuts import redirect, render
except ImportError:
     a_  :    Union[str, Any]      =			print





def __snake_case (				UpperCAmelCase_						:						List[Any]		):
 # Enter your recaptcha secret key here
 lowerCamelCase_								=  "secretKey"
 lowerCamelCase_								=  "https://www.google.com/recaptcha/api/siteverify"

 # when method is not POST, direct user to login page
 if request.method != "POST":
  return render(UpperCAmelCase_ ,    "login.html"		)

 # from the frontend, get username, password, and client_key
 lowerCamelCase_								=  request.POST.get("username"		)
 lowerCamelCase_								=  request.POST.get("password"		)
 lowerCamelCase_								=  request.POST.get("g-recaptcha-response"		)

 # post recaptcha response to Google's recaptcha api
 lowerCamelCase_								=  requests.post(UpperCAmelCase_ ,    data={"secret": secret_key, "response": client_key}		)
 # if the recaptcha api verified our keys
 if response.json().get("success" ,    UpperCAmelCase_		):
  # authenticate the user
  lowerCamelCase_								=  authenticate(UpperCAmelCase_ ,    username=UpperCAmelCase_ ,    password=UpperCAmelCase_		)
  if user_in_database:
   login(UpperCAmelCase_ ,    UpperCAmelCase_		)
   return redirect("/your-webpage"		)
 return render(UpperCAmelCase_ ,    "login.html"		)







'''simple docstring'''

class 					snake_case   :





  """simple docstring"""




  def __init__(   self      ,  UpperCamelCase					):







   """simple docstring"""
   lowerCamelCase_								=  data
   lowerCamelCase_								=  None
   lowerCamelCase_								=  None





def __snake_case (				UpperCAmelCase_						:						BinaryTreeNode | None ,    UpperCAmelCase_						:						int		):
 if node is None:
  lowerCamelCase_								=  BinaryTreeNode(UpperCAmelCase_		)
  return node

 # binary search tree is not empty,
 # so we will insert it into the tree
 # if new_value is less than value of data in node,
 #  add it to left subtree and proceed recursively
 if new_value < node.data:
  lowerCamelCase_								=  insert(node.left_child ,    UpperCAmelCase_		)
 else:
  # if new_value is greater than value of data in node,
  #  add it to right subtree and proceed recursively
  lowerCamelCase_								=  insert(node.right_child ,    UpperCAmelCase_		)
 return node





def __snake_case (				UpperCAmelCase_						:						None | BinaryTreeNode		):  # if node is None,return
 if node:
  lowerCamelCase_								=  inorder(node.left_child		)
  lowerCamelCase_								=  [*inorder_array, node.data]
  lowerCamelCase_								=  inorder_array + inorder(node.right_child		)
 else:
  lowerCamelCase_								=  []
 return inorder_array





def __snake_case (				):
 lowerCamelCase_								=  insert(UpperCAmelCase_ ,    15		)
 insert(UpperCAmelCase_ ,    10		)
 insert(UpperCAmelCase_ ,    25		)
 insert(UpperCAmelCase_ ,    6		)
 insert(UpperCAmelCase_ ,    14		)
 insert(UpperCAmelCase_ ,    20		)
 insert(UpperCAmelCase_ ,    60		)
 return root





def __snake_case (				):
 # main function
 lowerCamelCase_								=  make_tree()
 print("Printing values of binary search tree in Inorder Traversal."		)
 inorder(UpperCAmelCase_		)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     main()



