Index page lists titles of art in the "art" table.
[zzz-floof.git] / floof / controllers / main.py
diff --git a/floof/controllers/main.py b/floof/controllers/main.py
new file mode 100644 (file)
index 0000000..2b8b877
--- /dev/null
@@ -0,0 +1,15 @@
+import logging
+
+from pylons import request, response, session, tmpl_context as c
+from pylons.controllers.util import abort, redirect_to
+
+from floof.lib.base import BaseController, render
+from floof.model import meta, Art
+
+log = logging.getLogger(__name__)
+
+class MainController(BaseController):
+
+    def index(self):
+        c.artwork = meta.Session.query(Art).order_by(Art.id.desc()).all()
+        return render('/index.mako')