Example #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
Example #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
Example #3
0
	def index(self):
		c.body = self.scan_dashes()
		return render('/index.mako')
Example #4
0
 def index(self):
     c.body = self.scan_dashes()
     return render('/index.mako')