Beispiel #1
0
 def committee_experience_leave(self, *args):
     committee_key = args[0]
     committee = db.get(committee_key)
     member = self.current_member()
     experience = Experience.get_experience(member, committee)
     if experience:
         experience.delete()
         time.sleep(2)
     return self.committee_experience_part(*args)
Beispiel #2
0
 def committee_experience_part(self, *args):
     committee_key = args[0]
     committee = db.get(committee_key)
     member = self.current_member()
     experience = Experience.get_experience(member, committee)
     param = self.render_parameters()
     param["committee"] = committee
     param["role_list"] = Role.all()
     param["experience"] = experience
     if experience and experience.approved:
         param["pending_list"] = experience.pending_list()
     return self.render("committee_experience_part", param)
Beispiel #3
0
 def committee_experience_join(self, *args):
     committee_key = args[0]
     committee = db.get(committee_key)
     role_key = args[1]
     role = db.get(role_key)
     department = args[2]
     member = self.current_member()
     experience = Experience.get_experience(
         member, committee) or Experience(
             key_name="{0} {1}".format(committee.name(), member.id))
     experience.committee = committee.key()
     experience.role = role.key()
     experience.approved = False
     experience.department = department
     experience.member = member.key()
     experience.put()
     time.sleep(2)
     return self.committee_experience_part(*args)