Files
zulip/zerver/management/commands/initialize_production_database.py
Tim Abbott d9aa4161f8 install: Remove references to "Zulip Voyager".
"Zulip Voyager" was a name invented during the Hack Week to open
source Zulip for what a single-system Zulip server might be called, as
a Star Trek pun on the code it was based on, "Zulip Enterprise".

At the time, we just needed a name quickly, but it was never a good
name, just a placeholder.  This removes that placeholder name from
much of the codebase.  A bit more work will be required to transition
the `zulip::voyager` Puppet class, as that has some migration work
involved.
2020-02-19 17:00:17 +01:00

30 lines
1.1 KiB
Python

from argparse import ArgumentParser
from typing import Any
from django.conf import settings
from django.core.management.base import BaseCommand
from zerver.lib.server_initialization import create_internal_realm, server_initialized
settings.TORNADO_SERVER = None
class Command(BaseCommand):
help = "Populate system realm and bots for a Zulip production server"
def add_arguments(self, parser: ArgumentParser) -> None:
parser.add_argument('--extra-users',
dest='extra_users',
type=int,
default=0,
help='The number of extra users to create')
def handle(self, *args: Any, **options: Any) -> None:
if server_initialized():
print("Database already initialized; doing nothing.")
return
create_internal_realm()
self.stdout.write("Successfully populated database with initial data.\n")
self.stdout.write("Please run ./manage.py generate_realm_creation_link "
"to generate link for creating organization")