From 21c739a94ff3206c1f4fee8eaeea247739ce8afa Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Sat, 9 Feb 2013 20:42:43 +0100 Subject: [PATCH] Add --no-run parameter This parameter allows e.g. to synchronize the database without starting the webserver. --- openslides/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openslides/main.py b/openslides/main.py index d6db7a85e..7f26b875a 100644 --- a/openslides/main.py +++ b/openslides/main.py @@ -101,6 +101,9 @@ def process_options(argv=None, manage_runserver=False): "--no-browser", action="store_false", dest="start_browser", default=True, help="Do not automatically start web browser.") + parser.add_option( + "--no-run", action="store_true", + help="Do not start the development server.") parser.add_option( "--version", action="store_true", help="Show version and exit.") @@ -187,6 +190,9 @@ def _main(opts, database_path=None): elif opts.reset_admin: create_or_reset_admin_user() + if opts.no_run: + return + # Start OpenSlides reload = True if opts.no_reload: