Esempio n. 1
0
 def POST(self):
     """ Add new Activity """
     form = self.form()
     if not form.validates():
         activity = model.get_activity()
         return render.activity(activity, form)
     model.create_activity(form.d.phone_id, form.d.action, form.d.category, form.d.component, form.d.details)
     raise web.seeother('/activity/list')
Esempio n. 2
0
 def GET(self):
     activity = model.get_activity()
     return render.activity_list(activity)