diff wikked/web.py @ 49:fb6ae96756c1

Added unit tests. Refactored core APIs to make them more testable. Removed unused stuff like caching the configuration in the SQL database. Fixed the web bootstrap. Some cosmetic changes to be PEP8 compliant.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 28 Jan 2013 23:13:04 -0800
parents 86ee1b696070
children 494f3c4660ed
line wrap: on
line diff
--- a/wikked/web.py	Sat Jan 26 22:17:51 2013 -0800
+++ b/wikked/web.py	Mon Jan 28 23:13:04 2013 -0800
@@ -1,5 +1,5 @@
 from flask import Flask, abort, g
-from wiki import Wiki
+from wiki import Wiki, WikiParameters
 
 # Create the main app.
 app = Flask("wikked")
@@ -8,7 +8,9 @@
 
 
 def create_wiki():
-    wiki = Wiki(root=app.config.get('WIKI_ROOT'), logger=app.logger)
+    params = WikiParameters(root=app.config.get('WIKI_ROOT'))
+    params.logger = app.logger
+    wiki = Wiki(params)
     wiki.start()
     return wiki