Selaa lähdekoodia

cleaned up code and added cherrypy to .travis.yml

Keith Newman 10 vuotta sitten
vanhempi
commit
c729943646
3 muutettua tiedostoa jossa 13 lisäystä ja 12 poistoa
  1. 1 0
      .travis.yml
  2. 1 1
      frameworks/Python/cherrypy/README.md
  3. 11 11
      frameworks/Python/cherrypy/app.py

+ 1 - 0
.travis.yml

@@ -117,6 +117,7 @@ env:
     - "TESTDIR=PHP/phreeze"
     - "TESTDIR=Python/API-Hour"
     - "TESTDIR=Python/bottle"
+    - "TESTDIR=Python/cherrypy"
     - "TESTDIR=Python/django"
     - "TESTDIR=Python/falcon"
     - "TESTDIR=Python/flask"

+ 1 - 1
frameworks/Python/cherrypy/README.md

@@ -8,7 +8,7 @@ CherryPy framework (http://cherrypy.org)
 
 ### Database
 
-(none at the moment)
+MySQL
 
 ### Server
 

+ 11 - 11
frameworks/Python/cherrypy/app.py

@@ -97,14 +97,14 @@ class CherryPyBenchmark(object):
     return worlds
 
 if __name__ == "__main__":
-    # Register the SQLAlchemy plugin
-    from saplugin import SAEnginePlugin
-    DBDRIVER = 'mysql'
-    DBHOSTNAME = os.environ.get('DBHOST', 'localhost')  
-    DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
-    SAEnginePlugin(cherrypy.engine, DATABASE_URI).subscribe()
-
-    # Register the SQLAlchemy tool
-    from satool import SATool
-    cherrypy.tools.db = SATool()
-    cherrypy.quickstart(CherryPyBenchmark(), '', {'/': {'tools.db.on': True}})
+  # Register the SQLAlchemy plugin
+  from saplugin import SAEnginePlugin
+  DBDRIVER = 'mysql'
+  DBHOSTNAME = os.environ.get('DBHOST', 'localhost')  
+  DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
+  SAEnginePlugin(cherrypy.engine, DATABASE_URI).subscribe()
+
+  # Register the SQLAlchemy tool
+  from satool import SATool
+  cherrypy.tools.db = SATool()
+  cherrypy.quickstart(CherryPyBenchmark(), '', {'/': {'tools.db.on': True}})