Updated `MediaCommentForm.field_comment` => `MediaCommentForm.comment_content`
authorJoar Wandborg <git@wandborg.com>
Thu, 7 Jul 2011 20:45:51 +0000 (22:45 +0200)
committerJoar Wandborg <git@wandborg.com>
Thu, 7 Jul 2011 20:45:51 +0000 (22:45 +0200)
*   Also changed file encoding of `user_pages/forms.py` from dos to unix.

mediagoblin/templates/mediagoblin/user_pages/media.html
mediagoblin/user_pages/forms.py
mediagoblin/user_pages/views.py

index 477eae61fe4128ce3ec9bc43a37ba2a03ebf6f40..3f4dce3b565431eea69e5662ad010b54e1a3f221 100644 (file)
@@ -55,7 +55,7 @@
         <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment', 
                                          user= media.uploader().username,
                                          media=media._id) }}" method="POST">
-          {{ wtforms_util.render_field_div(comment_form.field_comment) }}
+          {{ wtforms_util.render_field_div(comment_form.comment_content) }}
           <div class="form_submit_buttons">
             <input type="submit" value="Post comment!" class="button" />
           </div>
index b234d73918a023cd89b05c994625e76a82c8a473..8829b674e41ac9bf8727de485da5b55f32b61a9a 100644 (file)
@@ -1,21 +1,22 @@
-# GNU MediaGoblin -- federated, autonomous media hosting\r
-# Copyright (C) 2011 Free Software Foundation, Inc\r
-#\r
-# This program is free software: you can redistribute it and/or modify\r
-# it under the terms of the GNU Affero General Public License as published by\r
-# the Free Software Foundation, either version 3 of the License, or\r
-# (at your option) any later version.\r
-#\r
-# This program is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-# GNU Affero General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Affero General Public License\r
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-\r
-import wtforms\r
-\r
-class MediaCommentForm(wtforms.Form):\r
-       field_comment = wtforms.TextAreaField('Comment',\r
-       [wtforms.validators.Required()])\r
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 Free Software Foundation, Inc
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import wtforms
+
+class MediaCommentForm(wtforms.Form):
+       comment_content = wtforms.TextAreaField(
+               'Comment',
+               [wtforms.validators.Required()])
index ca1060a30955c1c7ba5c12ffeff8365f2305c8cd..a3172ebd86199f5ec1deac70f7de82892f0b4bba 100644 (file)
@@ -124,7 +124,7 @@ def media_post_comment(request):
     comment = request.db.MediaComment()
     comment['media_entry'] = ObjectId(request.matchdict['media'])
     comment['author'] = request.user['_id']
-    comment['content'] = request.POST['field_comment']
+    comment['content'] = request.POST['comment_content']
 
     comment['content_html'] = cleaned_markdown_conversion(comment['content'])