Add test for get_all_media()
[mediagoblin.git] / mediagoblin / listings / routing.py
index b72bd01519000b3ff4bc04df4b38c5454b126854..ee8f502027174fe6df13f8dd5b96c09ce344752e 100644 (file)
@@ -1,5 +1,5 @@
 # GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 MediaGoblin contributors.  See AUTHORS.
+# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
 #
 # 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
 # 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/>.
 
+from mediagoblin.tools.routing import add_route
 
-from routes.route import Route
+add_route('mediagoblin.listings.tags_listing',
+          "/tag/<string:tag>/",
+          "mediagoblin.listings.views:tag_listing")
 
-tag_routes = [
-    # Route('mediagoblin.listings.tags_home', "/",
-    #    controller="mediagoblin.listings.views:tags_home"),
-    Route('mediagoblin.listings.tags_listing', "/{tag}/",
-        controller="mediagoblin.listings.views:tag_listing"),
-    Route('mediagoblin.listings.tag_atom_feed', "/{tag}/atom/",
-        controller="mediagoblin.listings.views:tag_atom_feed"),
-    ]
-    
+# Atom feeds:
+add_route('mediagoblin.listings.tag_atom_feed', "/tag/<string:tag>/atom/",
+    "mediagoblin.listings.views:atom_feed")
+
+# The all new entries feed
+add_route('mediagoblin.listings.atom_feed', '/atom/',
+    "mediagoblin.listings.views:atom_feed")