diff options
author | 藍挺瑋 <lantw44@gmail.com> | 2012-12-18 17:29:35 +0800 |
---|---|---|
committer | lantw44 <lantw44@gmail.com> | 2012-12-18 17:30:46 +0800 |
commit | 469b6c7b6cbf36d25dcfd3df4142a7b009081be6 (patch) | |
tree | 4de659451ff3edfdb003e5fb142b3a6888b2a71b | |
parent | 31aaa7205710412ba748d08a6380288163182f02 (diff) | |
download | inccalendar-469b6c7b6cbf36d25dcfd3df4142a7b009081be6.tar.gz inccalendar-469b6c7b6cbf36d25dcfd3df4142a7b009081be6.tar.zst inccalendar-469b6c7b6cbf36d25dcfd3df4142a7b009081be6.zip |
配合加入 remind 項目所做的修改
-rw-r--r-- | access/fetch.py | 2 | ||||
-rw-r--r-- | access/insert.py | 2 | ||||
-rw-r--r-- | access/update.py | 6 | ||||
-rw-r--r-- | jinhtml/list.html | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/access/fetch.py b/access/fetch.py index 67698e2..ccc33d3 100644 --- a/access/fetch.py +++ b/access/fetch.py @@ -28,6 +28,8 @@ def XMLBuildCalEvent(calevent, entry): newdata.text = str(entry.begin.hour) newdata = etree.SubElement(calevent, 'minute') newdata.text = str(entry.begin.minute) + newdata = etree.SubElement(calevent, 'remind') + newdata.text = str(entry.remind) newdata = etree.SubElement(calevent, 'datafrom') newdata.text = entry.datafrom diff --git a/access/insert.py b/access/insert.py index 24579d3..2f4184a 100644 --- a/access/insert.py +++ b/access/insert.py @@ -33,7 +33,7 @@ class InsertEvent(webapp2.RequestHandler): minute = thisbeginminute ); thisdatafrom = self.request.get('datafrom') - thisremind = self.request.get('remind') + thisremind = int(self.request.get('remind')) newcalevent = CalEvent( db.Key.from_path('user', guserid.email()), diff --git a/access/update.py b/access/update.py index f443c25..e80c183 100644 --- a/access/update.py +++ b/access/update.py @@ -30,8 +30,8 @@ class UpdateEvent (webapp2.RequestHandler) : minute = thisbeginminute ); thisdatafrom = self.request.get('datafrom') - thisremind = self.request.get('remind') - thiskey = self.request.get('key') + thisremind = int(self.request.get('remind')) + mykey = self.request.get('key') eventdata = db.get(mykey) eventdata.icon = thisicon @@ -43,4 +43,4 @@ class UpdateEvent (webapp2.RequestHandler) : eventdata.put() -app = webapp2.WSGIApplication([('/access/update', UpdateEvent)])
\ No newline at end of file +app = webapp2.WSGIApplication([('/access/update', UpdateEvent)]) diff --git a/jinhtml/list.html b/jinhtml/list.html index 7a05ec8..a6f5859 100644 --- a/jinhtml/list.html +++ b/jinhtml/list.html @@ -30,7 +30,7 @@ $.ajax ({ type: "POST", url: "/access/insert", - data: "title=123&content=eventcontent&icon=5&year=2012&month=12&date=16&hour=10&minute=10&datafrom=google", + data: "title=123&content=eventcontent&icon=5&year=2012&month=12&date=16&hour=10&minute=10&datafrom=google&remind=77", success: function () { alert ("POST SUCCESS!!"); } @@ -67,4 +67,4 @@ 找不到活動 </div> <button type = "button" onclick = "pushdata ();"> Click Me !! </button> -{% endblock %}
\ No newline at end of file +{% endblock %} |