

def post(self):
    if (str(self.request.get('action')) == 'Add'):
        cron.Cron().add_cron(str(self.request.get('cron_entry')))
    elif (str(self.request.get('action')) == 'Delete'):
        entry = db.get(db.Key(str(self.request.get('key'))))
        entry.delete()
    query = cron._AppEngineUtilities_Cron.all()
    results = query.fetch(1000)
    template_values = {
        'cron_entries': results,
    }
    path = os.path.join(os.path.dirname(__file__), 'templates/scheduler_form.html')
    self.response.out.write(template.render(path, template_values))

dataset/ETHPy150Open CollabQ/CollabQ/common/appengine_utilities/interface/main.py MainPage.post/original