Clean up initialize_enterprise_db and fix domain.

(imported from commit af6f20c7705720c0043817516fdb3c21777796bb)
This commit is contained in:
Tim Abbott 2013-11-13 16:33:43 -05:00
parent eab6a1d190
commit 81156cf2f5
1 changed files with 1 additions and 8 deletions

View File

@ -43,16 +43,9 @@ class Command(BaseCommand):
for realm in Realm.objects.all(): for realm in Realm.objects.all():
realms[realm.domain] = realm realms[realm.domain] = realm
# Create test Users (UserProfiles are automatically created,
# as are subscriptions to the ability to receive personals).
names = [(settings.FEEDBACK_BOT_NAME, settings.FEEDBACK_BOT)] names = [(settings.FEEDBACK_BOT_NAME, settings.FEEDBACK_BOT)]
for i in xrange(options["extra_users"]):
names.append(('Extra User %d' % (i,), 'extrauser%d@zulip.com' % (i,)))
create_users(realms, names) create_users(realms, names)
# Create the "website" and "API" clients; if we don't, the
# default values in zerver/decorators.py will not work
# with the Django test suite.
get_client("website") get_client("website")
get_client("API") get_client("API")
@ -67,5 +60,5 @@ class Command(BaseCommand):
self.stdout.write("Successfully populated database with initial data.\n") self.stdout.write("Successfully populated database with initial data.\n")
site = Site.objects.get_current() site = Site.objects.get_current()
site.domain = 'zulip.com' site.domain = settings.EXTERNAL_HOST
site.save() site.save()