@require_POST
def get_user_invoice_preference(request, course_id):
 invoice_copy_preference = True
 invoice_preference_value = get_user_preference(request.user, INVOICE_KEY)
 if (invoice_preference_value is not None):
  invoice_copy_preference = (invoice_preference_value == 'True')
 return JsonResponse({'invoice_copy': invoice_copy_preference})

@ require_POST def get_user_invoice_preference ( request , course_id ) : invoice_copy_preference = True invoice_preference_value = get_user_preference ( request . user , INVOICE_KEY ) if ( invoice_preference_value is not None ) : invoice_copy_preference = ( invoice_preference_value == 'True' ) return JsonResponse ( { 'invoice_copy' : invoice_copy_preference } )
gets invoice copy users preferences .