Added parent property/links for comments, and a Return link on comment threads.
[zzz-floof.git] / floof / controllers / art.py
index ca1d7dc..9576109 100644 (file)
@@ -9,6 +9,7 @@ log = logging.getLogger(__name__)
 
 import elixir
 from floof.model.art import Art, Rating
+from floof.model.comments import Discussion
 
 from sqlalchemy.exceptions import IntegrityError
 
@@ -31,6 +32,7 @@ class ArtController(BaseController):
     # TODO: login required
     def create(self):
         c.art = Art(uploader=c.user, **request.params)
+        c.art.discussion = Discussion(count=0)
 
         try:
             elixir.session.commit()