Updated MediaCommentForm.field_comment => MediaCommentForm.comment_content

*   Also changed file encoding of `user_pages/forms.py` from dos to unix.
This commit is contained in:
Joar Wandborg 2011-07-07 22:45:51 +02:00
parent af2fcba5c4
commit f646f5d36d
3 changed files with 24 additions and 23 deletions

View 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>

View File

@ -17,5 +17,6 @@
import wtforms
class MediaCommentForm(wtforms.Form):
field_comment = wtforms.TextAreaField('Comment',
comment_content = wtforms.TextAreaField(
'Comment',
[wtforms.validators.Required()])

View 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'])