diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-11 14:18:27 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-11 21:48:03 +0100 |
commit | 461dd9717cce6c5b4d40bb4e76ca65d9d898d1df (patch) | |
tree | 9b55136a4c5353ed3e65dc6c82f7ecad7d2cd784 /mediagoblin/user_pages/routing.py | |
parent | 8b271c28bd4c0b9c90990d87c1dfd0d8d95b9e45 (diff) | |
download | mediagoblin-461dd9717cce6c5b4d40bb4e76ca65d9d898d1df.tar.lz mediagoblin-461dd9717cce6c5b4d40bb4e76ca65d9d898d1df.tar.xz mediagoblin-461dd9717cce6c5b4d40bb4e76ca65d9d898d1df.zip |
Start to use the media_id in "admin" URLs.
We have a bunch of URLs that are more for internal use. At
least they're definitely not intended to be posted
somewhere for long term useage.
When those things affect a media, it's much better to
reference the media by its id. This can't change, ever.
This is better for races.
Like someone posting a comment while the owner
corrects a typo in the slug.
Diffstat (limited to 'mediagoblin/user_pages/routing.py')
-rw-r--r-- | mediagoblin/user_pages/routing.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/user_pages/routing.py b/mediagoblin/user_pages/routing.py index 63bf5c2a..d36e7598 100644 --- a/mediagoblin/user_pages/routing.py +++ b/mediagoblin/user_pages/routing.py @@ -24,12 +24,12 @@ add_route('mediagoblin.user_pages.media_home', 'mediagoblin.user_pages.views:media_home') add_route('mediagoblin.user_pages.media_confirm_delete', - '/u/<string:user>/m/<string:media>/confirm-delete/', + '/u/<string:user>/m/<int:media_id>/confirm-delete/', 'mediagoblin.user_pages.views:media_confirm_delete') # Submission handling of new comments. TODO: only allow for POST methods add_route('mediagoblin.user_pages.media_post_comment', - '/u/<string:user>/m/<string:media>/comment/add/', + '/u/<string:user>/m/<int:media_id>/comment/add/', 'mediagoblin.user_pages.views:media_post_comment') add_route('mediagoblin.user_pages.user_gallery', @@ -74,7 +74,7 @@ add_route('mediagoblin.user_pages.processing_panel', # Stray edit routes add_route('mediagoblin.edit.edit_media', - '/u/<string:user>/m/<string:media>/edit/', + '/u/<string:user>/m/<int:media_id>/edit/', 'mediagoblin.edit.views:edit_media') add_route('mediagoblin.edit.attachments', |