예제 #1
0
파일: trackdays.py 프로젝트: gmelson/AAGSNC
    def post(self):
        s = Trackday.query()
        for _s in s:
            _s.key.delete()

        trackday = Trackday(jsondata = self.request.body, lastUpdated=datetime.datetime.now())        
        trackday.put()
예제 #2
0
파일: trackdays.py 프로젝트: gmelson/AAGSNC
    def post(self):
        s = Trackday.query()
        for _s in s:
            _s.key.delete()

        trackday = Trackday(jsondata=self.request.body,
                            lastUpdated=datetime.datetime.now())
        trackday.put()
예제 #3
0
파일: trackdays.py 프로젝트: gmelson/AAGSNC
 def get(self):
     clientupdated = self.request.get("lastupdated")
     self.response.headers['Content-Type'] = 'application/json'
     try:
         trackdays = Trackday.query()
         for trackday in trackdays:
             if trackday.lastUpdated:
                 self.response.out.write(trackday.lastUpdated)
                 if(trackday.lastUpdated > clientupdated) :
                     self.writeData(trackday.jsondata)
                     #self.response.out.write(trackday.jsondata)
             else:
                 self.writeData(trackday.jsondata)
     except Exception:
         e = sys.exc_info()[0]
         logging.info('error getting trackdays from db %s' % str(e))
예제 #4
0
파일: trackdays.py 프로젝트: gmelson/AAGSNC
 def get(self):
     clientupdated = self.request.get("lastupdated")
     self.response.headers['Content-Type'] = 'application/json'
     try:
         trackdays = Trackday.query()
         for trackday in trackdays:
             if trackday.lastUpdated:
                 self.response.out.write(trackday.lastUpdated)
                 if (trackday.lastUpdated > clientupdated):
                     self.writeData(trackday.jsondata)
                     #self.response.out.write(trackday.jsondata)
             else:
                 self.writeData(trackday.jsondata)
     except Exception:
         e = sys.exc_info()[0]
         logging.info('error getting trackdays from db %s' % str(e))