From 491e26c3f176baa783bfb231682687db6dc8a82c Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Fri, 9 Nov 2012 13:21:50 +0100 Subject: [PATCH 1/2] Changed beta2 relase date. --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 25748561a..92ca78025 100644 --- a/README.txt +++ b/README.txt @@ -2,7 +2,7 @@ English README file for OpenSlides ================================== -This is OpenSlides, version 1.3-beta2 (2012-11-07). +This is OpenSlides, version 1.3-beta2 (2012-11-09). What is OpenSlides? From 28cf531e4dfb9ed53d5a095b38d3785fb5471573 Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Fri, 9 Nov 2012 10:19:53 +0100 Subject: [PATCH 2/2] Pass along database path to create_settings if started as portable version --- openslides/main.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) mode change 100644 => 100755 openslides/main.py diff --git a/openslides/main.py b/openslides/main.py old mode 100644 new mode 100755 index 498ddb8ef..83e41395e --- a/openslides/main.py +++ b/openslides/main.py @@ -72,7 +72,7 @@ def _fs2unicode(s): return s.decode(_fs_encoding) -def main(argv=None, opt_defaults=None): +def main(argv=None, opt_defaults=None, database_path=None): if argv is None: argv = sys.argv[1:] @@ -108,7 +108,7 @@ def main(argv=None, opt_defaults=None): # Create settings if necessary if not os.path.exists(settings_path): - create_settings(settings_path) + create_settings(settings_path, database_path) # Set the django environment to the settings setup_django_environment(settings_path) @@ -289,6 +289,8 @@ def win32_portable_main(argv=None): if portable_dir_writeable: default_settings = os.path.join(portable_dir, "openslides", "openslides_personal_settings.py") + database_path = os.path.join(portable_dir, "openslides", + "database.sqlite") else: import ctypes @@ -307,8 +309,11 @@ def win32_portable_main(argv=None): raise Exception("Could not deterime APPDATA path") default_settings = os.path.join(buf.value, "openslides", "openslides_personal_settings.py") + database_path = os.path.join(buf.value, "openslides", + "database.sqlite") - main(argv, opt_defaults={ "settings": default_settings }) + main(argv, opt_defaults={ "settings": default_settings }, + database_path=database_path) if __name__ == "__main__":