Files
zulip/zerver/migrations/0087_remove_old_scheduled_jobs.py
James Rowan 368bd66d8b emails: Refactor send_email functions to take both a sender name and address.
This will allow for customized senders for emails, e.g. 'Zulip Digest' for
digest emails and 'Zulip Missed Messages' for missed message emails.

Also:
* Converts the sender name to always be "Zulip", if the from_email used to
  be settings.NOREPLY_EMAIL_ADDRESS or settings.ZULIP_ADMINISTRATOR.

* Changes the default value of settings.NOREPLY_EMAIL_ADDRESS in the
  prod_setting_template to no longer have a display name. The only use of
  that display name was in the email pathway.
2017-07-04 14:25:01 -07:00

28 lines
939 B
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-10 05:59
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
def delete_old_scheduled_jobs(apps, schema_editor):
# type: (StateApps, DatabaseSchemaEditor) -> None
"""Delete any old scheduled jobs, to handle changes in the format of
send_email. Ideally, we'd translate the jobs, but it's not really
worth the development effort to save a few invitation reminders
and day2 followup emails.
"""
ScheduledJob = apps.get_model('zerver', 'ScheduledJob')
ScheduledJob.objects.all().delete()
class Migration(migrations.Migration):
dependencies = [
('zerver', '0086_realm_alter_default_org_type'),
]
operations = [
migrations.RunPython(delete_old_scheduled_jobs),
]