Beispiel #1
0
 def post(self):
     usersay = self.get_argument("ask0", "")
     a = AndeSay()
     andesay = a.get_andesay(usersay)
     user_id = ""
     if self.current_user:
         user_id = self.current_user["user_id"]
     if not user_id:
         user_id = a.user_ip().replace(".", "")
     log = Ande.create(user_id="1", usersay=usersay, andesay=andesay)
     self.write(andesay)
Beispiel #2
0
 def post(self):
     usersay = self.get_argument("ask0", '')
     print usersay
     a = AndeSay()
     andesay = a.get_andesay(usersay)
     user_id = ''
     if self.current_user:
         user_id = self.current_user["user_id"]
     if not user_id:
         user_id = a.user_ip().replace('.', '')
     Ande.create(
         user_id='1',
         usersay=usersay,
         andesay=andesay, )
     self.write(andesay)
Beispiel #3
0
 def post(self):
     usersay = self.get_argument("ask0", '')
     print usersay
     a = AndeSay()
     andesay = a.get_andesay(usersay)
     user_id = ''
     if self.current_user:
         user_id = self.current_user["user_id"]
     if not user_id:
         user_id = a.user_ip().replace('.', '')
     Ande.create(
         user_id='1',
         usersay=usersay,
         andesay=andesay,
     )
     self.write(andesay)
Beispiel #4
0
    def post(self):
        usersay = self.get_argument("ask0", '')
        # print usersay
        # user_lang = self.get_user_lang()
        userip = self.request.remote_ip
        a = AndeSay()
        andesay = a.get_andesay(usersay, userip)
        andesay += '<br/>your ip:' + userip
        andesay += '<br/>'

        user_id = ''
        if self.current_user:
            user_id = self.current_user["user_id"]
        if not user_id:
            user_id = userip.replace('.', '')
        Ande.create(
            user_id='1',
            usersay=usersay,
            andesay=andesay, )
        # print andesay
        self.write(andesay)