Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: cms/bin/test_server.py

Issue 29555839: Issue 5336 - Allow additional include, page, and template paths using CMS (Closed)
Patch Set: Created Sept. 25, 2017, 7:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld