From 5868c8e328f75712ce986e159a415a1dfbba966f Mon Sep 17 00:00:00 2001 From: Samuel Lai Date: Thu, 28 Nov 2013 22:06:33 +1100 Subject: [PATCH] Fixed settings for Windows compatibility. --- python/src/stackdump/default_settings.py | 2 +- python/src/stackdump/settings.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/python/src/stackdump/default_settings.py b/python/src/stackdump/default_settings.py index dff79d5..79efb07 100644 --- a/python/src/stackdump/default_settings.py +++ b/python/src/stackdump/default_settings.py @@ -18,7 +18,7 @@ SERVER_PORT = 8080 SOLR_URL = 'http://localhost:8983/solr/stackdump/' import os -DATABASE_CONN_STR = 'sqlite://%s/../../../data/stackdump.sqlite' % os.path.dirname(__file__) +DATABASE_CONN_STR = 'sqlite:///' + os.path.join(os.path.dirname(__file__), '..', '..', '..', 'data', 'stackdump.sqlite') # if the website is hosted under a subpath, specify it here. It must end with a # slash. diff --git a/python/src/stackdump/settings.py b/python/src/stackdump/settings.py index 58072c3..cafc02c 100644 --- a/python/src/stackdump/settings.py +++ b/python/src/stackdump/settings.py @@ -19,9 +19,10 @@ from default_settings import * # uncomment if the default host and port for Solr is different. #SOLR_URL = 'http://localhost:8983/solr/stackdump/' -# uncomment if the database for Stackdump is not the default SQLite one -#import os -#DATABASE_CONN_STR = 'sqlite://%s/../../../data/stackdump.sqlite' % os.path.dirname(__file__) +# uncomment if the database for Stackdump is not the default SQLite one or you +# wish to have the database at a different path to the stackdump_root/data +# directory +#DATABASE_CONN_STR = 'sqlite:///' + path_to_the_database # if the website is hosted under a subpath, specify it here. It must end with a # slash.