Beispiel #1
0
 def post(self):
     user = users.get_current_user()
     q = HelpRequest.query(HelpRequest.in_queue == True,
                           HelpRequest.netid == user.email(),
                           ancestor=help_queue_key())
     if q.count() != 0:
         self.response.write('Unable to add to queue')
         return
     hr = HelpRequest(parent=help_queue_key())
     hr.netid = user.email()
     hr.name = self.request.get('name')
     hr.help_msg = self.request.get('help_msg')
     hr.course = self.request.get('course')
     hr.put()
     ChannelManager.queue_update()