Commits

Chris Jones committed 2e9c693

Simple info page for redis info.

  • Participants
  • Parent commits f78b26a

Comments (0)

Files changed (2)

         output = r.get(key)
     return render_template('key.html', key=key, output=output)
 
+@app.route('/info/')
+def info():
+    return render_template('info.html', info=r.info().items())
+
 if __name__ == '__main__':
     app.run()

File templates/info.html

+<!DOCTYPE HTML>
+<html>
+<head>
+	<meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+	<title>Redbeard</title>
+	
+</head>
+<body>
+	<h1>Red fuckin' beard</h1>
+	<h2>Redis Info</h2>
+	<ul>
+		{% for i in info %}
+		<li>{{ i.0 }}: {{ i.1 }}</li>
+		{% endfor %}
+	</ul>
+</body>
+</html>