When doing a deployment, set the site name to app.humbughq.com.

(imported from commit b89f72f0cb94fae7678db570a1e9774dbe471ba9)
This commit is contained in:
Luke Faraone 2012-10-26 11:10:48 -04:00
parent 4e9df28c12
commit 75c6fa7202

View File

@ -2,6 +2,7 @@ from django.core.management.base import BaseCommand
from django.utils.timezone import utc
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from zephyr.models import Message, UserProfile, Stream, Recipient, Client, \
Subscription, Huddle, get_huddle, Realm, UserMessage, get_user_profile_by_id, \
bulk_create_realms, bulk_create_streams, bulk_create_users, bulk_create_huddles, \
@ -201,6 +202,9 @@ class Command(BaseCommand):
self.stdout.write("Successfully populated test database.\n")
if options["replay_old_messages"]:
restore_saved_messages()
site = Site.objects.get_current()
site.domain = 'humbughq.com'
site.save()
# Set restored pointers to the very latest messages
for user_profile in UserProfile.objects.all():