コード例 #1
0
  def post(self):
    try:
      name = self.request.get('name')
      university = self.request.get('university')
      course= self.request.get('course')
      
      upload = self.get_uploads()[0]
      
      picture = Picture()
      picture.image = upload.key()
      picture.name = name
      picture.name_university = university
      picture.name_course = course
      
      db.put(picture)

      self.redirect('/view_photo/%s' % upload.key())
      #self.response.out.write('TUDO FUNCIONOU OK!!!!')

    except:
      #self.redirect('/upload_failure.html')
      self.response.out.write('FALHOUUUUU FUDEUUUU!')