d8e46f3abf4585d4b18f82d75246d69c861f7b53
3 from pylons
import request
, response
, session
, tmpl_context
as c
, h
4 from pylons
.controllers
.util
import abort
, redirect
6 from floof
.lib
.base
import BaseController
, render
9 log
= logging
.getLogger(__name__
)
12 from floof
.model
.art
import Art
, Tag
14 class TagController(BaseController
):
16 # TODO: login required
17 def delete(self
, art_id
, id):
20 elixir
.session
.delete(tag
)
21 elixir
.session
.commit()
22 redirect(url('art', id=art_id
))
24 # TODO: login required
25 def create(self
, art_id
):
26 c
.art
= h
.get_object_or_404(Art
, id=art_id
)
27 c
.art
.add_tags(request
.params
["tags"], c
.user
)
28 elixir
.session
.commit()
29 redirect(url('art', id=c
.art
.id))