e34543bcba98df6a652d0517e1b00a7e6b05f860
[zzz-floof.git] / floof / controllers / art.py
1 import logging
2
3 from pylons import request, response, session, tmpl_context as c
4 from pylons.controllers.util import abort, redirect_to
5
6 from floof.lib.base import BaseController, render
7
8 log = logging.getLogger(__name__)
9
10 import elixir
11 from floof.model.art import Art
12
13 class ArtController(BaseController):
14
15 # def index():
16 # c.artwork = Art.query.order_by(Art.id.desc()).all()
17 # return render
18
19 def new(self):
20 """ New Art! """
21 return render("/art/new.mako")
22
23
24 def upload(self):
25 print "PARAMS", request.params
26 Art(**request.params)
27 elixir.session.commit()
28 redirect_to(controller="main", action="index")