[csw-devel] SF.net SVN: gar:[16219] csw/mgar/gar/v2/lib/web/pkgdb_web.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Nov 20 20:34:12 CET 2011


Revision: 16219
          http://gar.svn.sourceforge.net/gar/?rev=16219&view=rev
Author:   wahwah
Date:     2011-11-20 19:34:12 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
pkgdb-web: Annotate which URLs are REST

No functional change; use variable names to annotate which URLs are for the
HTML views, and which are RESTful.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/web/pkgdb_web.py

Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py	2011-11-20 19:27:59 UTC (rev 16218)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py	2011-11-20 19:34:12 UTC (rev 16219)
@@ -13,7 +13,7 @@
 import datetime
 from sqlobject import sqlbuilder
 
-urls = (
+urls_html = (
   r'/', 'index',
   r'/srv4/', 'Srv4List',
   r'/srv4/([0-9a-f]{32})/', 'Srv4Detail',
@@ -27,6 +27,8 @@
   r'/error-tags/([^/]+)/', 'ErrorTagDetail',
   r'/catalognames/', 'CatalognameList',
   r'/catalognames/([^/]+)/', 'Catalogname',
+)
+urls_rest = (
   r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/', 'Catalogs',
   r'/rest/catalogs/([^/]+)/(sparc|i386)/(SunOS[^/]+)/pkgname-by-filename',
       'PkgnameByFilename',
@@ -37,6 +39,7 @@
   r'/rest/srv4/([0-9a-f]{32})/files/', 'RestSrv4DetailFiles',
   r'/rest/srv4/([0-9a-f]{32})/pkg-stats/', 'RestSrv4FullStats',
 )
+urls = urls_html + urls_rest
 
 # render = web.template.render('templates/')
 # render = web.template.render('/home/maciej/src/pkgdb_web/templates/')

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list