예제 #1
0
    def get(self):

        User_email = self.request.params.get("User_email")
        to_whom = self.request.params.get("to:")
        content = self.request.params.get("content")
        is_Anonynmous = self.request.params.get("is_Anonynmous")
        latitude = self.request.params.get("latitude")
        longitude = self.request.params.get("longitude")
        current_user = User.query(User.email == User_email).fetch(1)[0]
        newyeller = Yeller(author=User_email)
        if is_Anonynmous == "true":
            newyeller.Anonymity = True
        else:
            newyeller.Anonymity = False
        newyeller.to_whom = to_whom
        newyeller.text = content
        newyeller.latitude = float(latitude)
        newyeller.longitude = float(longitude)

        yeller_key = newyeller.put()
        newyeller.key_id = str(newyeller.key.id())
        newyeller.put()
        current_user.yellers_owned.append(yeller_key)

        current_user.put()
예제 #2
0
    def get(self):

        User_email = self.request.params.get("User_email")
        to_whom = self.request.params.get("to:")
        content = self.request.params.get("content")
        is_Anonynmous = self.request.params.get("is_Anonynmous")
        latitude = self.request.params.get("latitude")
        longitude = self.request.params.get("longitude")
        current_user = User.query(User.email == User_email).fetch(1)[0]
        newyeller = Yeller(author=User_email)
        if is_Anonynmous == "true":
            newyeller.Anonymity = True
        else:
            newyeller.Anonymity = False
        newyeller.to_whom = to_whom
        newyeller.text = content
        newyeller.latitude = float(latitude)
        newyeller.longitude = float(longitude)

        yeller_key = newyeller.put()
        newyeller.key_id = str(newyeller.key.id())
        newyeller.put()
        current_user.yellers_owned.append(yeller_key)

        current_user.put()
예제 #3
0
    def post(self):
        User_email = self.request.params.get('User_email')
        current_user = User.query(User.email == User_email).fetch(1)[0]
        activity = self.request.params.get('activity')
        upload = self.get_uploads()[0]
        if activity == 'FeedPad':
            content = self.request.params.get('content')
            latitude = self.request.params.get("latitude")
            longitude = self.request.params.get("longitude")

            newyeller = Yeller(author=User_email)
            newyeller.text = content
            newyeller.latitude = float(latitude)
            newyeller.longitude = float(longitude)
            newyeller.to_whom = 'public'
            newyeller.Anonymity = False
            newyeller.pictures.append(Picture(blob_key=upload.key()))
            yeller_key = newyeller.put()
            newyeller.key_id = str(newyeller.key.id())
            newyeller.put()
            current_user.yellers_owned.append(yeller_key)
        else:
            current_user.head_portrait = upload.key()

        current_user.put()
예제 #4
0
    def post(self):
        User_email = self.request.params.get('User_email')
        current_user = User.query(User.email == User_email).fetch(1)[0]
        activity = self.request.params.get('activity')
        upload = self.get_uploads()[0]
        if activity == 'FeedPad':
            content = self.request.params.get('content')
            latitude = self.request.params.get("latitude")
            longitude = self.request.params.get("longitude")

            newyeller = Yeller(author=User_email)
            newyeller.text = content
            newyeller.latitude = float(latitude)
            newyeller.longitude = float(longitude)
            newyeller.to_whom='public'
            newyeller.Anonymity = False
            newyeller.pictures.append(Picture(blob_key=upload.key()))
            yeller_key = newyeller.put()
            newyeller.key_id = str(newyeller.key.id())
            newyeller.put()
            current_user.yellers_owned.append(yeller_key)
        else:
            current_user.head_portrait=upload.key()

        current_user.put()