def AuthenticatedPost(self, org, event):
        config_keys = ConfigKey.all()
        keys_by_name = {cf.name: cf for cf in config_keys}
        for k, v in self.request.POST.items():
            config_key = keys_by_name.get(k)
            if config_key:
                config_key.value = v
                config_key.save()

        # sleep to wait for db
        sleep(3)

        # redirect to self
        return self.redirect(self.request.path)
    def AuthenticatedPost(self, org, event):
        config_keys = ConfigKey.all()
        keys_by_name = {cf.name:cf for cf in config_keys}
        for k, v in self.request.POST.items():
            config_key = keys_by_name.get(k)
            if config_key:
                config_key.value = v
                config_key.save()

        # sleep to wait for db
        sleep(3)

        # redirect to self
        return self.redirect(self.request.path)
 def AuthenticatedGet(self, org, event):
     config_keys = ConfigKey.all().order('name')
     return self.render(
         config_keys=config_keys,
         config_key_options=CONFIG_KEY_OPTIONS,
     )
 def AuthenticatedGet(self, org, event):
     config_keys = ConfigKey.all().order('name')
     return self.render(
         config_keys=config_keys,
         config_key_options=CONFIG_KEY_OPTIONS,
     )
 def AuthenticatedGet(self, org, event):
     config_keys = ConfigKey.all().order('name')
     return self.render(config_keys=config_keys)
 def AuthenticatedGet(self, org, event):
     config_keys = ConfigKey.all().order('name')
     return self.render(
         config_keys=config_keys
     )