Beispiel #1
0
	def read_dash(self, fname):
		try:
			dash = json.load(file(fname))
			c.title = dash.get('title', os.path.basename(fname))
			c.updated = dash.get('updated', time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(os.path.getmtime(fname))))
			c.headers = dash.get('headers', [])
			c.note = dash.get('note', '')
			c.data = dash.get('data', [])
			return render('/dash.mako')
		except:
			return "ERROR - %s" % fname
Beispiel #2
0
 def read_dash(self, fname):
     try:
         dash = json.load(file(fname))
         c.title = dash.get('title', os.path.basename(fname))
         c.updated = dash.get(
             'updated',
             time.strftime("%Y-%m-%d %H:%M:%S",
                           time.localtime(os.path.getmtime(fname))))
         c.headers = dash.get('headers', [])
         c.note = dash.get('note', '')
         c.data = dash.get('data', [])
         return render('/dash.mako')
     except:
         return "ERROR - %s" % fname
Beispiel #3
0
	def index(self):
		c.body = self.scan_dashes()
		return render('/index.mako')
Beispiel #4
0
 def index(self):
     c.body = self.scan_dashes()
     return render('/index.mako')