aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2012-09-26 20:51:57 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2012-09-26 20:51:57 +0200
commit3f2e923073fcff55f2d0ace3f9c272d70e7291d5 (patch)
tree16e49f8642bf208ea8b23ba058bb0d22fd1ef672
parent152da3819ec545f3900d637382e9d78164e8a141 (diff)
downloadnanocloudlogger-3f2e923073fcff55f2d0ace3f9c272d70e7291d5.tar.gz
nanocloudlogger-3f2e923073fcff55f2d0ace3f9c272d70e7291d5.zip
Added default page
-rwxr-xr-xsrc/loggergae/api.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/loggergae/api.py b/src/loggergae/api.py
index 3dd48bd..070aa8c 100755
--- a/src/loggergae/api.py
+++ b/src/loggergae/api.py
@@ -11,16 +11,16 @@ class Feed(db.Model):
class MainPage(webapp2.RequestHandler):
def get(self):
- self.response.out.write('main page')
-
-
+ self.response.headers['Content-Type'] = 'text/html'
+ self.response.out.write('<h3>Nano Cloud Logger</h3>')
class StreamGet(webapp2.RequestHandler):
def get(self):
- response = []
-
- if self.request.get('limit') <> '': limit = 'limit ' + self.request.get('limit')
- else: limit = ''
+ response = []
+ if self.request.get('limit') <> '':
+ limit = 'limit ' + self.request.get('limit')
+ else:
+ limit = ''
feed = db.GqlQuery('select * from Feed where stream=:1 order by datetime desc ' + limit, self.request.get('stream'))
@@ -68,6 +68,7 @@ class StreamSet(webapp2.RequestHandler):
feed.data = self.request.get(input)
feed.input = str(input)
feed.put()
+
if self.request.get('format') == 'csv':
self.response.headers['Content-Type'] = 'plain/text'
self.response.out.write('status: ok')