models, forms, actions: Switch from Humbug to Zulip in user-visible text.

(imported from commit 97966e5f118276a00d116bba0b52616bbd83cb72)
This commit is contained in:
Jessica McKellar
2013-07-10 16:00:47 -04:00
parent 108ecb3b5b
commit 116ad8da5f
3 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ def is_inactive(value):
except UserProfile.DoesNotExist: except UserProfile.DoesNotExist:
pass pass
SIGNUP_STRING = '<a href="https://humbughq.com/signup">Sign up</a> to find out when Humbug is ready for you.' SIGNUP_STRING = '<a href="https://humbughq.com/signup">Sign up</a> to find out when Zulip is ready for you.'
def has_valid_realm(value): def has_valid_realm(value):
try: try:
@@ -26,7 +26,7 @@ def has_valid_realm(value):
def isnt_mit(value): def isnt_mit(value):
if "@mit.edu" in value: if "@mit.edu" in value:
raise ValidationError(mark_safe(u'Humbug for MIT is by invitation only. ' + SIGNUP_STRING)) raise ValidationError(mark_safe(u'Zulip for MIT is by invitation only. ' + SIGNUP_STRING))
class RegistrationForm(forms.Form): class RegistrationForm(forms.Form):
full_name = forms.CharField(max_length=100) full_name = forms.CharField(max_length=100)

View File

@@ -1270,8 +1270,8 @@ def do_send_missedmessage_email(user_profile, missed_messages):
template_payload['reply_warning'] = True template_payload['reply_warning'] = True
headers['Reply-To'] = "Nobody <noreply@humbughq.com>" headers['Reply-To'] = "Nobody <noreply@humbughq.com>"
subject = "Missed Humbug%s from %s" % ('s' if len(senders) > 1 else '', sender_str) subject = "Missed Zulip%s from %s" % ('s' if len(senders) > 1 else '', sender_str)
from_email = "%s (via Humbug) <noreply@humbughq.com>" % (sender_str) from_email = "%s (via Zulip) <noreply@humbughq.com>" % (sender_str)
text_content = loader.render_to_string('zephyr/missed_message_email.txt', template_payload) text_content = loader.render_to_string('zephyr/missed_message_email.txt', template_payload)
html_content = loader.render_to_string('zephyr/missed_message_email_html.txt', template_payload) html_content = loader.render_to_string('zephyr/missed_message_email_html.txt', template_payload)

View File

@@ -424,7 +424,7 @@ class Message(models.Model):
if self.rendered_content is not None: if self.rendered_content is not None:
obj['content'] = self.rendered_content obj['content'] = self.rendered_content
else: else:
obj['content'] = '<p>[Humbug note: Sorry, we could not understand the formatting of your message]</p>' obj['content'] = '<p>[Zulip note: Sorry, we could not understand the formatting of your message]</p>'
obj['content_type'] = 'text/html' obj['content_type'] = 'text/html'
else: else: