Index: cms/bin/test_server.py |
=================================================================== |
--- a/cms/bin/test_server.py |
+++ b/cms/bin/test_server.py |
@@ -16,17 +16,17 @@ |
import mimetypes |
import os |
import sys |
import argparse |
import jinja2 |
from cms.utils import process_page |
-from cms.sources import FileSource |
+from cms.sources import create_source |
from cms.converters import converters |
source = None |
address = None |
port = None |
UNICODE_ENCODING = 'utf-8' |
@@ -123,17 +123,17 @@ |
if __name__ == '__main__': |
parser = argparse.ArgumentParser(description='CMS development server created to test pages locally and on-the-fly') |
parser.add_argument('path', nargs='?', default=os.curdir) |
parser.add_argument('-a', '--address', default='localhost', help='Address of the interface the server will listen on') |
parser.add_argument('-p', '--port', type=int, default=5000, help='TCP port the server will listen on') |
args = parser.parse_args() |
- source = FileSource(args.path) |
+ source = create_source(args.path) |
address = args.address |
port = args.port |
try: |
from werkzeug.serving import ThreadedWSGIServer, run_simple |
# see https://github.com/mitsuhiko/werkzeug/pull/770 |
ThreadedWSGIServer.daemon_threads = True |