aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages/forms.py
diff options
context:
space:
mode:
authorJoar Wandborg <git@wandborg.com>2011-07-07 18:04:19 +0200
committerJoar Wandborg <git@wandborg.com>2011-07-07 18:04:19 +0200
commitaf2fcba5c4ce16bde1a2267b95803bc2afc9e572 (patch)
tree6323a6a4f6a10f7660a92c918bea2d2f0321f125 /mediagoblin/user_pages/forms.py
parent5ed4722de8106a512a4faacfedaae7b8eda7260b (diff)
downloadmediagoblin-af2fcba5c4ce16bde1a2267b95803bc2afc9e572.tar.lz
mediagoblin-af2fcba5c4ce16bde1a2267b95803bc2afc9e572.tar.xz
mediagoblin-af2fcba5c4ce16bde1a2267b95803bc2afc9e572.zip
Issue #431 - Prevent comment link expiry - Added functionality for comment linking
* `media.html` * Changed comment textarea handle from `comment` => `field_comment` * Active comment is hilighted with the CSS class name `comment_active` and also with the hyperlink anchor #comment * Changed media.html so that pagination always uses Route('mediagoblin.user_pages.media_home') as base_url * `user_pages/forms.py` * Renamed MediaComment form field `comment` => `field_comment` * `user_pages/routing.py` * Added route for `/u/joar/m/123..456/c/234..567/`, points to `media_home` * `user_pages/views.py` * `media_home` now checks if the request contains a comment id parameter then acts accordingly with pagination whether to call it with a `jump_to_id` or not. * `media_post_comment` - Updated MediaCommentForm field name `comment` => `field_comment` * `util.py` * `redirect` now supports querystring arguments. - NOT USED (should we keep it? I think so, it might be useful, sometime [don't call me a code hoarder]). * `Pagination.__init__` now accepts one further argument, the `jump_to_id`. It assist the comment linking functionality in finding and returning the proper page for a comment. This feature will work for all kinds of objects. It might not be optimal, but it is well functional :)
Diffstat (limited to 'mediagoblin/user_pages/forms.py')
-rw-r--r--mediagoblin/user_pages/forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/user_pages/forms.py b/mediagoblin/user_pages/forms.py
index 9f7d2fbd..b234d739 100644
--- a/mediagoblin/user_pages/forms.py
+++ b/mediagoblin/user_pages/forms.py
@@ -17,5 +17,5 @@
import wtforms
class MediaCommentForm(wtforms.Form):
- comment = wtforms.TextAreaField('Comment',
- [wtforms.validators.Required()]) \ No newline at end of file
+ field_comment = wtforms.TextAreaField('Comment',
+ [wtforms.validators.Required()])