Module FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad Assign NameStore Num For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore BinOpSub AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad keyword Call NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Assign AttributeStore NameLoad attr BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword ListComp Call NameLoad keyword NameLoad comprehension NameStore AttributeLoad NameLoad attr keyword Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpMod Call NameLoad Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad Str keyword NameLoad Expr Call NameLoad Call NameLoad Str decorator_list Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Num Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad Call NameLoad Str Assign NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpMod Call NameLoad Str AttributeLoad NameLoad attr AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad Str keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad Call NameLoad Str decorator_list Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Num Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr Return Call NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Import alias Expr Call NameLoad NameLoad Assign NameStore Call NameLoad keyword Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Num Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr If NameLoad body Return Call NameLoad keyword Str keyword NameLoad If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad Call NameLoad keyword AttributeLoad NameLoad attr attr keyword Num Assign NameStore BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Call NameLoad Str keyword NameLoad orelse If AttributeLoad NameLoad attr body Assign NameStore Str orelse Assign NameStore Str Assign NameStore BinOpMult Str Num AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad AttributeLoad NameLoad attr AugAssignAdd NameStore Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad Call NameLoad keyword AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Call NameLoad Str keyword NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Str orelse Expr Call NameLoad Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad Call NameLoad keyword AttributeLoad NameLoad attr attr keyword Num Assign NameStore BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpMod Call NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Call NameLoad Str keyword NameLoad If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Str For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad orelse Assign NameStore Call NameLoad Str Return Call NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr attr Return Call NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad keyword Call AttributeLoad NameLoad attr Num keyword NameLoad Return Call NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr Lambda arguments args defaults Call NameLoad keyword Call AttributeLoad NameLoad attr Num keyword NameLoad
N/A shopping_cart N/A N/A N/A N/A N/A 
	This is the user's shopping cart. All courses that
	the user will buy (free or not) are recorded in a
	session until the Buy Now action.
	 N/A classes N/A N/A amount 0 N/A class_id N/A session cart N/A N/A cart_class N/A Class id class_id N/A N/A N/A classes append cart_class N/A amount N/A N/A N/A cart_class course price N/A N/A cart_class course discount N/A N/A dict classes classes amount amount N/A remove_from_shopping_cart N/A N/A N/A N/A N/A 
	Just a delete function to remove items from
	the shopping cart.
	 N/A class_id N/A N/A request args 0 cast int N/A N/A N/A N/A session cart remove class_id N/A N/A redirect N/A URL shopping_cart N/A register_order N/A N/A N/A N/A N/A 
	This function will register the user's shopping cart
	in a database record. This record is a order that
	contains payment info and will serve as a history
	of the user transactions.

	After the order is recorded, the session of the 
	shopping cart will be clean.
	 N/A class_id N/A session cart N/A N/A cart_class N/A Class id N/A int class_id N/A N/A N/A can_enroll cart_class N/A N/A N/A session flash N/A N/A T You are already enrolled in this class to %s, so we removed it from your shopping cart. N/A N/A cart_class course title N/A N/A N/A N/A session cart remove class_id N/A N/A redirect N/A URL shopping_cart N/A order N/A N/A Order insert user_id N/A N/A auth user id order_date N/A request now products N/A N/A Class id cart_class N/A cart_class N/A session cart status 1 N/A N/A session order order N/A N/A session cart N/A N/A message N/A N/A T We just received your order number %s: N/A order token N/A product N/A order products N/A N/A message N/A message N/A N/A T - %s from %s to %s N/A N/A N/A product course title N/A product start_date N/A product end_date N/A message N/A message N/A N/A T Amount: R$%.2f N/A order amount N/A message N/A message N/A T We will wait and let you know when your payment is confirmed. N/A message N/A message N/A T Thank you for your purchase! N/A N/A N/A mail send to N/A N/A order user_id email subject N/A T We received your order! message message N/A N/A redirect N/A URL pay_courses N/A N/A N/A auth requires_login pay_courses N/A N/A N/A N/A N/A 
	This function is responsible to redirect the user
	to the payment method it chose and process if
	the amount to be paid is free. In this case, it will
	enroll the student to the class. Other way, the user
	will be redirected to pay.
	 N/A order N/A Order id N/A session order N/A N/A N/A order amount 0 N/A N/A pending N/A N/A Pending insert order_id N/A session order confirmed True N/A confirmed N/A N/A Confirmed insert order_id N/A order id pending_id N/A pending id confirmation_time N/A request now N/A N/A N/A order update_record status 2 N/A N/A session pending pending N/A N/A redirect N/A URL success N/A message N/A N/A T We just confirmed your payment for order number %s. N/A order token N/A message N/A message N/A N/A T The total amount was R$%.2f. N/A order amount N/A message N/A message N/A T You can check your payment history after login in to your profile. N/A message N/A message N/A T Thank you! N/A N/A N/A mail send to N/A N/A order user_id email subject N/A T Payment confirmed! message message N/A N/A pending N/A N/A Pending insert order_id N/A order id N/A N/A session pending pending N/A N/A redirect N/A URL paypal N/A N/A N/A auth requires_login paypal N/A N/A N/A N/A N/A 
	This is a function to submit the user's shopping cart
	to PayPal to proceed with the payment.

	The view of	this function contain a form that 
	passes the values of each product in the shopping
	cart and submit them so PayPal can deal with them.
	 N/A N/A N/A session pending N/A N/A N/A HTTP 404 N/A pending N/A Pending id N/A session pending N/A N/A dict pending pending N/A N/A N/A auth requires_login ipn N/A N/A N/A N/A N/A 
	The IPN is the method that PayPal uses to
	return information about the payment.

	This function will receive this info and
	validate it, marking the user's order as
	confirmed or not.

	PayPal only confirm the receipt of this
	information if you return the same info
	it passed to you. So, we return the
	request.vars at the end of the function.
	 N/A json N/A N/A write_logs request N/A pending N/A Pending id N/A int N/A N/A request vars invoice confirmed False N/A N/A pending N/A N/A N/A HTTP 404 N/A already_confirmed N/A Confirmed pending_id N/A pending id N/A already_confirmed N/A N/A N/A dict status Already Confirmed data already_confirmed N/A N/A N/A N/A request vars payment_status Completed N/A N/A confirmed N/A N/A Confirmed insert order_id N/A pending order_id pending_id N/A pending id confirmation_time N/A request now N/A N/A N/A pending update_record confirmed True N/A N/A N/A N/A Order id N/A pending order_id update_record status 2 N/A message N/A N/A T We just confirmed your payment for order number %s. N/A N/A pending order_id token N/A message N/A message N/A N/A T The total amount was R$%.2f. N/A N/A pending order_id amount N/A message N/A message N/A T You can check your payment history after login in to your profile. N/A message N/A message N/A T Thank you! N/A N/A N/A mail send to N/A N/A N/A pending order_id user_id email subject N/A T Payment confirmed! message message N/A N/A N/A request is_local N/A N/A path /tmp/ipn_not_completed.txt N/A N/A path /var/log/ipn_not_completed.txt N/A message N/A - 80 N/A message 
IPN NOT COMPLETED
 N/A message N/A str N/A request vars N/A message N/A N/A log_in_file message path N/A N/A N/A N/A Order id N/A pending order_id update_record status 3 N/A mail_message N/A T There was a problem with your payment! N/A mail_message N/A mail_message N/A T Something happened and we couldn't verify your payment. N/A mail_message N/A mail_message N/A T If you're sure you paid the order, please contact us. Otherwise, try to pay again later. N/A mail_message N/A mail_message N/A T Thank you. N/A N/A N/A mail send to N/A N/A N/A pending order_id user_id email subject N/A T Something went wrong! message mail_message N/A N/A N/A json dumps N/A request vars N/A success N/A N/A N/A N/A N/A 
	This function is supposed to show a success or error message
	depending of what PayPal IPN returns.

	Since in localhost we receive no return of PayPal, we can
	hack a little bit in order to make the app continuous.
	 N/A N/A request is_local N/A N/A N/A log_in_file N/A str N/A request vars /tmp/paypalreturn.txt N/A N/A N/A log_in_file N/A str N/A request vars /var/log/paypalreturn.txt N/A pending N/A Pending id N/A session pending N/A N/A request is_local N/A N/A confirmed N/A N/A Confirmed insert order_id N/A pending order_id pending_id N/A pending id confirmation_time N/A request now N/A N/A N/A pending update_record confirmed True N/A N/A N/A N/A Order id N/A pending order_id update_record status 2 N/A mail_message N/A N/A T We just confirmed your payment for order number %s. N/A N/A pending order_id token N/A mail_message N/A mail_message N/A N/A T The total amount was R$%.2f. N/A N/A pending order_id amount N/A mail_message N/A mail_message N/A T You can check your payment history after login in to your profile. N/A mail_message N/A mail_message N/A T Thank you! N/A N/A N/A mail send to N/A N/A N/A pending order_id user_id email subject N/A T Payment confirmed! message mail_message N/A N/A N/A pending confirmed N/A request is_local N/A N/A message N/A T Payment completed! Congratulations for your purchase! N/A cart_class N/A N/A pending order_id products N/A N/A N/A N/A Student insert student N/A N/A auth user id class_id cart_class N/A N/A message N/A T Sorry! Something bad happened! N/A N/A dict message message N/A N/A N/A auth requires_login history N/A N/A N/A N/A N/A 
	This function exposes to the user it's
	orders and payment history.
	 N/A history N/A N/A N/A db N/A N/A Order user_id N/A N/A auth user id select N/A N/A dict history history N/A N/A N/A auth requires_login details N/A N/A N/A N/A N/A 
	This function exposes details of the
	user's orders.
	 N/A order N/A Order id N/A N/A request args 0 cast int N/A N/A dict order order N/A N/A N/A auth requires N/A N/A N/A N/A N/A is_user_order order_id N/A N/A request args 0 cast int