[csw-devel] SF.net SVN: gar:[17291] csw/mgar/gar/v2/lib/web
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Mar 4 15:55:52 CET 2012
Revision: 17291
http://gar.svn.sourceforge.net/gar/?rev=17291&view=rev
Author: wahwah
Date: 2012-03-04 14:55:52 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
pkgdb-web: use mod_wsgi
Modified Paths:
--------------
csw/mgar/gar/v2/lib/web/pkgdb_web.py
csw/mgar/gar/v2/lib/web/releases_web.py
Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py 2012-03-04 14:55:21 UTC (rev 17290)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py 2012-03-04 14:55:52 UTC (rev 17291)
@@ -2,6 +2,10 @@
# A webpy application to allow HTTP access to the checkpkg database.
+import sys
+import os
+sys.path.append(os.path.join(os.path.split(__file__)[0], "..", ".."))
+
import web
import sqlobject
import json
@@ -44,9 +48,7 @@
)
urls = urls_html + urls_rest
-# render = web.template.render('templates/')
-# render = web.template.render('/home/maciej/src/pkgdb_web/templates/')
-render = web.template.render('/home/maciej/src/opencsw-git/gar/v2/'
+render = web.template.render('/home/web/bin/gar/'
'lib/web/templates/')
@@ -425,6 +427,7 @@
app = web.application(urls, globals())
main = app.wsgifunc()
+application = app.wsgifunc()
if __name__ == "__main__":
Modified: csw/mgar/gar/v2/lib/web/releases_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/releases_web.py 2012-03-04 14:55:21 UTC (rev 17290)
+++ csw/mgar/gar/v2/lib/web/releases_web.py 2012-03-04 14:55:52 UTC (rev 17291)
@@ -2,6 +2,10 @@
# A webpy application to allow HTTP access to the checkpkg database.
+import sys
+import os
+sys.path.append(os.path.join(os.path.split(__file__)[0], "..", ".."))
+
import web
import sqlobject
import json
@@ -13,8 +17,6 @@
from lib.python import opencsw
from lib.python import common_constants
import datetime
-import os
-import os.path
import hashlib
import logging
@@ -257,8 +259,11 @@
web.webapi.internalerror = web.debugerror
-app = web.application(urls, globals(), autoreload=False)
-main = app.wsgifunc()
+app = web.application(urls, globals())
+# main = app.wsgifunc()
+application = app.wsgifunc()
+from paste.exceptions.errormiddleware import ErrorMiddleware
+application = ErrorMiddleware(application, debug=True)
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
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