コード例 #1
0
 def post(self):
     machine_id = self.get_argument('machine_id')
     customer = Customer.get_by_key_name(session.get_current_username())
     credentials = ActivationCredentials.get_all_active_for_customer_and_machine_id(
         customer=customer,
         machine_id=machine_id)
     self.set_header('Content-Type', 'application/json')
     self.write(json.dumps(len(credentials) > 0))
コード例 #2
0
 def post(self):
     if not self.is_logged_in():
         self.redirect(LOGIN_PAGE_URL)
     else:
         machine_id = self.get_argument('machine_id')
         timezone = self.get_argument('timezone')
         deactivation_entry_code = self.get_argument('deactivation_entry_code')
     
         customer = Customer.get_by_key_name(self.get_current_username())
         activation_credentials = ActivationCredentials.get_all_active_for_customer_and_machine_id(customer=customer, machine_id=machine_id)
         self.render('deinstall_maths_english_input.html', 
             activation_credentials=activation_credentials,
             customer=customer,
             machine_id=machine_id,
             timezone=timezone,
             deactivation_entry_code=deactivation_entry_code)