collection browsing: rename view/template user_collections -> collection_list
authorStefano Zacchiroli <zack@upsilon.cc>
Tue, 15 Jan 2013 22:11:33 +0000 (23:11 +0100)
committerStefano Zacchiroli <zack@upsilon.cc>
Tue, 15 Jan 2013 22:28:10 +0000 (23:28 +0100)
Rationale, avoid confusion between views user_collection and user_collections
(note trailing "s"). Ditto for the collection(s).html templates.

mediagoblin/templates/mediagoblin/root.html
mediagoblin/templates/mediagoblin/user_pages/collection_list.html [moved from mediagoblin/templates/mediagoblin/user_pages/collections.html with 100% similarity]
mediagoblin/user_pages/routing.py
mediagoblin/user_pages/views.py

index 0be6c9f4f3ca5150d6f189a73f904e0c221adb8e..11e8f2ace47be39d7658e75ea4e8ebc0a1299eb4 100644 (file)
@@ -27,7 +27,7 @@
         <li><a href="{{ request.urlgen('mediagoblin.submit.start') }}">
           {%- trans %}Add media{% endtrans -%}
         </a></li>
-        <li><a href="{{ request.urlgen('mediagoblin.user_pages.user_collections',
+        <li><a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
                                       user=request.user.username) }}">
             {%- trans %}Browse collections{% endtrans -%}
        </a></li>
index 50243a2b8d916d379426353e61feebaf9e090400..24bbab56b3415148e0aeabd60d7891c8a1f053d1 100644 (file)
@@ -48,9 +48,9 @@ add_route('mediagoblin.user_pages.media_collect',
           '/u/<string:user>/m/<string:media>/collect/',
           'mediagoblin.user_pages.views:media_collect')
 
-add_route('mediagoblin.user_pages.user_collections',
+add_route('mediagoblin.user_pages.collection_list',
           '/u/<string:user>/collections/',
-          'mediagoblin.user_pages.views:user_collections')
+          'mediagoblin.user_pages.views:collection_list')
 
 add_route('mediagoblin.user_pages.user_collection',
           '/u/<string:user>/collection/<string:collection>/',
index 9fbe953b339bcdd8332b939fccce8296e69ea576..0727b58accc4e5d617a9b72b9fe551e32baf7a78 100644 (file)
@@ -338,14 +338,14 @@ def user_collection(request, page, url_user=None):
 
 
 @active_user_from_url
-def user_collections(request, url_user=None):
+def collection_list(request, url_user=None):
     """A User-defined Collection"""
     collections = Collection.query.filter_by(
         get_creator=url_user)
 
     return render_to_response(
         request,
-        'mediagoblin/user_pages/collections.html',
+        'mediagoblin/user_pages/collection_list.html',
         {'user': url_user,
          'collections': collections})